************************************************************************************************************
* 2012 * 2012 * 2012 * 2012 * 2012 * 2012 * 2012 * 2012 * 2012 * 2012 * 2012 * 2012 * 2012 * 2012 * 2012 * 2012 
************************************************************************************************************
cd "E:\Dropbox\RR Discrim Turnout\REPLICATION FOLDER"

clear
set more off


use "anes_timeseries_2012.dta" /// REPLACE WITH PATH TO RAW 2016 ANES

set linesize 90
set more off

/////////////////////////////Geographic Location Variables/////////////////////////

////Regional location - could separate mountain west also should MD, DE be considered South, 
//Northeast (964 cases), Northcentral (1256 cases - does not include PA), South (2283 cases), West (1411 cases) 
codebook sample_region

//Mountain West Region - MT, ID, WY, NV, CO, UT, AZ, NM (334 cases) 
gen mtnwest = sample_stfips
replace mtnwest=1 if sample_stfips==30 | sample_stfips==35 |sample_stfips==32 | sample_stfips==56 /*
	*/ |sample_stfips==49 |sample_stfips==16 |sample_stfips==4 
replace mtnwest=0 if sample_stfips!=30 & sample_stfips!=35 & sample_stfips!=32 & sample_stfips!=56 & /*
	*/ sample_stfips!=49 & sample_stfips!=16 & sample_stfips!=4 
codebook mtnwest

//Pacific West Region - CA, WA, OR, HA, AK  (995 cases) 
gen pacwest = sample_stfips
replace pacwest=1 if sample_stfips==6 | sample_stfips==53 |sample_stfips==41 | sample_stfips==15 /*
	*/ |sample_stfips==2 
replace pacwest=0 if sample_stfips!=6 & sample_stfips!=53 & sample_stfips!=41 & sample_stfips!=15 & /*
	*/ sample_stfips!=2 
codebook pacwest

//Updated Regions --- I have two questions - 1) Should TX be the South 2) Should we separte Mountain west 
	//look at regional variables
	tab sample_region
	tab sample_stfips
	tab sample_state
	
	tab sample_state if sample_region==1
	tab sample_state if sample_region==2
	tab sample_state if sample_region==3
	tab sample_state if sample_region==4

gen dreg = sample_region
replace dreg=1 if sample_state=="DE"|sample_state=="MD"|sample_state=="DC"  
replace dreg=3 if sample_state=="TX"
replace dreg=2 if sample_state=="OK" |sample_state=="WV"
replace dreg=5 if sample_state=="CA"|sample_state=="OR"|sample_state=="WA"|sample_state=="HI"|sample_state=="AK"
label var dreg "1=Northeast 2=Midwest 3=South 4=Mountain West 5=Pacific" 
tab dreg
tab sample_state if dreg==1 //northeast
tab sample_state if dreg==2 //midwest
tab sample_state if dreg==3 //south
tab sample_state if dreg==4 //mountain west
tab sample_state if dreg==5 //pacific

gen south = sample_region
replace south=1 if sample_region==3
replace south=0 if sample_region!=3

gen midwest = sample_region
replace midwest=1 if sample_region==2
replace midwest=0 if sample_region!=2

gen northeast = sample_region
replace northeast=1 if sample_region==1
replace northeast=0 if sample_region!=1

///Key State Dummies
gen nc = sample_stfips
replace nc=1 if sample_stfips==37
replace nc=0 if sample_stfips!=37
codebook nc

gen ca = sample_stfips
replace ca=1 if sample_stfips==6
replace ca=0 if sample_stfips!=6
codebook ca

gen fl = sample_stfips
replace fl=1 if sample_stfips==12
replace fl=0 if sample_stfips!=12
codebook fl

gen oh = sample_stfips
replace oh=1 if sample_stfips==39
replace oh=0 if sample_stfips!=39
codebook oh

gen pa= sample_stfips
replace pa=1 if sample_stfips==42
replace pa=0 if sample_stfips!=42
codebook pa 

gen mi= sample_stfips
replace mi=1 if sample_stfips==26
replace mi=0 if sample_stfips!=26
codebook mi

gen ny= sample_stfips
replace ny=1 if sample_stfips==36 
replace ny=0 if sample_stfips!=36
codebook ny

gen tx= sample_stfips
replace tx=1 if sample_stfips==48 
replace tx=0 if sample_stfips!=48 
codebook tx

//States safe for DEMS in 2016 -  Dems won by more than 10% in electoral results (WA, VT, RI, MD, NJ, OR, NY, MA, IL, HI, DC, CT, CA) 
//does not include Iowa, GA, VA gen states_notclose2016 = sample_stfips
gen states_safedem2016 = sample_stfips
replace states_safedem2016=1 if sample_stfips==53 | sample_stfips==50 |sample_stfips==44 |sample_stfips==41 |sample_stfips==36 |sample_stfips==9 |sample_stfips==6
replace states_safedem2016=1 if sample_stfips==34 |sample_stfips==24 | sample_stfips==25 |sample_stfips==17 |sample_stfips==15 |sample_stfips==11 
replace states_safedem2016=0 if sample_stfips!=53 & sample_stfips!=50 & sample_stfips!=44 & sample_stfips!=41 & sample_stfips!=36 & /*
     */ sample_stfips!=9 & sample_stfips!=6 & sample_stfips!=34 & sample_stfips!=24 & sample_stfips!=25 & sample_stfips!=17 & sample_stfips!=15 & sample_stfips!=11 
codebook states_safedem2016

gen states_flip2016 = sample_stfips
replace states_flip2016=1 if sample_stfips==26 | sample_stfips==39 |sample_stfips==12 |sample_stfips==42 |sample_stfips==19 |sample_stfips==55 
replace states_flip2016=0 if sample_stfips!=26 & sample_stfips!=39 & sample_stfips!=12 & sample_stfips!=42 & sample_stfips!=19 & sample_stfips!=55 
codebook states_flip2016

//State was close in 2016 - within 5% in electoral results (NV,AZ,CO,MN,MI,WI,FL,NC,PA,NH,ME) 
//does not include Iowa, GA, VA,  - not working too many &'s I think 
gen states_close2016 = sample_stfips
replace states_close2016=1 if sample_stfips==55 | sample_stfips==42 |sample_stfips==32 |sample_stfips==37 |sample_stfips==4 
replace states_close2016=1 if sample_stfips==27 |sample_stfips==26 | sample_stfips==23 |sample_stfips==12 |sample_stfips==8 |sample_stfips==33 
replace states_close2016=0 if sample_stfips!=55 & sample_stfips!=42 & sample_stfips!=32 & sample_stfips!=37 & sample_stfips!=4 & sample_stfips!=27 & /*
   */ sample_stfips!=26 & sample_stfips!=23 & sample_stfips!=12 & sample_stfips!=8 & sample_stfips!=33 
codebook states_close2016

//State safe for REP in 2016 -  Republicans won by more than 10% in electoral results 
//(AK, AL, AR, IN, ID, KS, KY, LA, MO, MT, MP, NE, ND, OK, SD, TN, UT, WV, WY - does not include IA, TX, AZ, TXgen states_saferep2016 = sample_stfips 
gen states_saferep2016 = sample_stfips
replace states_saferep2016=1 if sample_stfips==56 | sample_stfips==54 |sample_stfips==49 |sample_stfips==47 |sample_stfips==46 |sample_stfips==40 
replace states_saferep2016=1 if sample_stfips==38 |sample_stfips==31 | sample_stfips==30 |sample_stfips==28 |sample_stfips==29 |sample_stfips==22
replace states_saferep2016=1 if sample_stfips==21 |sample_stfips==20 | sample_stfips==18 |sample_stfips==16 |sample_stfips==1 |sample_stfips==2 |sample_stfips==5
replace states_saferep2016=0 if sample_stfips!=56 & sample_stfips!=54 & sample_stfips!=49 & sample_stfips!=47 & sample_stfips!=46 & sample_stfips!=40 & /*
     */ sample_stfips!=38 & sample_stfips!=31 & sample_stfips!=30 & sample_stfips!=28 & sample_stfips!=29 & sample_stfips!=22 & sample_stfips!=21 & /*
     */ sample_stfips!=20 & sample_stfips!=18 & sample_stfips!=16 & sample_stfips!=1 & sample_stfips!=2 & sample_stfips!=5
codebook states_saferep2016

 
////////////////////////Outcome Variables//////////////////////////////////////////////

//GENERATE Dichotomous White LINKED FATE VARIABLE- Do you think that what happens generally to WHITE PEOPLE 
//in this country will have something to do with what happens in your life?
codebook link_white link_whiteamt

gen w_lf = link_white
replace w_lf= 0 if link_white==2
replace w_lf= . if link_white<=0 
label var w_lf "White Linked Fate: Yes (1), No(0)" 
codebook w_lf link_white

//GENERATE Ordinal White LINKED FATE VARIABLE- Will it affect you [a lot, some, or not very much?)
gen w_lfamt = link_whiteamt 
replace w_lfamt= 0 if link_whiteamt<0  & link_white== 2
replace w_lfamt= 3 if link_whiteamt==1
replace w_lfamt= 1 if link_whiteamt==3
replace w_lfamt= . if link_whiteamt<0 & link_white!=2
label var w_lfamt "Amount of White Linked Fate: A lot (3), Some (2), Not very much (0)" 
codebook link_white w_lf link_whiteamt w_lfamt

//////////////////////Extra Variables for Other Projects//////////////////////////////////////////////////////

///Other variables for later projects ident_asianid ident_blackid ident_whiteid ident_hispid

///Measures of Linked Fate for other Groups 

//GENERATE Dichotomous Black LINKED FATE VARIABLE- Do you think that what happens generally to BLACK PEOPLE in this country will have something to do with what happens in your life?
gen b_lf = link_black
replace b_lf= 0 if link_black==2
replace b_lf= . if link_black<=0 
label var b_lf "Black Linked Fate: Yes (1), No(0)" 
codebook b_lf link_blackamt link_black

//GENERATE Ordinal Black LINKED FATE VARIABLE- Will it affect you [a lot, some, or not very much?)
gen b_lfamt = link_blackamt 
replace b_lfamt= 0 if link_blackamt<= 0 & link_black== 2
replace b_lfamt= 3 if link_blackamt==1
replace b_lfamt= 1 if link_blackamt==3
replace b_lfamt= . if link_blackamt<=0 & link_black!=2
label var b_lfamt "Amount of Black Linked Fate: A lot (3), Some (2), Not very much (0)" 
codebook b_lfamt

//GENERATE Dichotomous Hispanic LINKED FATE VARIABLE- Do you think that what happens generally to HISPANIC PEOPLE in this country will have something to do with what happens in your life?
gen h_lf = link_hisp
replace h_lf= 0 if link_hisp==2
replace h_lf= . if link_hisp<=0 
label var h_lf "Hispanic Linked Fate: Yes (1), No(0)" 
codebook h_lf

codebook link_hispamt

//GENERATE Ordinal Hispanic LINKED FATE VARIABLE- Will it affect you [a lot, some, or not very much?)
gen h_lfamt = link_hispamt 
replace h_lfamt= 0 if link_hispamt<= 0 & link_hisp== 2
replace h_lfamt= 3 if link_hispamt==1
replace h_lfamt= 1 if link_hispamt==3
replace h_lfamt= . if link_hispamt<=0 & link_hisp!= 2
label var h_lfamt "Amount of Hispanic Linked Fate: A lot (3), Some (2), Not very much (0)" 
codebook link_hisp h_lfamt link_hispamt

//GENERATE Dichotomous Women LINKED FATE VARIABLE- Do you think that what happens generally to WOMEN PEOPLE in this country will have something to do with what happens in your life?
gen wom_lf = link_wom
replace wom_lf= 0 if link_wom==2
replace wom_lf= . if link_wom<=0 
label var wom_lf "Women Linked Fate: Yes (1), No(0)" 
codebook wom_lf link_wom 

//GENERATE Ordinal Women LINKED FATE VARIABLE- Will it affect you [a lot, some, or not very much?)
gen wom_lfamt = link_womamt 
replace wom_lfamt= 0 if link_womamt<= 0 & link_wom== 2 
replace wom_lfamt= 1 if link_womamt== 3
replace wom_lfamt= 3 if link_womamt== 1
replace wom_lfamt= . if link_womamt<=0 & link_wom!=2
label var wom_lfamt "Amount of Women Linked Fate: A lot (3), Some (2), Not very much (0)" 

codebook wom_lf link_wom link_womamt wom_lfamt

//GENERATE Dichotomous Other LINKED FATE VARIABLE- Do you think that what happens generally to OTHER PEOPLE in this country will have something to do with what happens in your life?
gen oth_lf = link_oth
replace oth_lf= 0 if link_oth==2
replace oth_lf= . if link_oth<=0 
label var oth_lf "Other Linked Fate: Yes (1), No(0)" 
codebook oth_lf link_oth

codebook link_othamt

//GENERATE Ordinal Other LINKED FATE VARIABLE- Will it affect you [a lot, some, or not very much?)
gen oth_lfamt = link_othamt 
replace oth_lfamt= 0 if link_othamt<=0 & link_oth==2
replace oth_lfamt= 3 if link_othamt==1
replace oth_lfamt= 1 if link_othamt==3
replace oth_lfamt= . if link_othamt<=0 & link_oth!=2
label var oth_lfamt "Amount of Other Linked Fate: A lot (3), Some (2), Not very much (0)" 

codebook oth_lf oth_lfamt link_oth link_othamt


//Generate Importance of White Identity
codebook ident_whiteid

//white identity: how important is being white 
//dropped 1887 - 455 not asked or refused (~4000 cases remain) 
gen whiteid = ident_whiteid
recode whiteid (-6=.) (-8=.) (-9=.) (-7=.)(-2=.) (-1=.)
recode whiteid (1=5) (2=4) (5=1) (4=2)
label var whiteid "1= Not Very Imp 2= A little 3= Moderately 4= Very 5= Extremely Important"
codebook ident_whiteid whiteid

//Black identity: how important is being Black
codebook ident_blackid
gen blackid = ident_blackid
recode blackid (-6=.) (-8=.) (-9=.) (-7=.)(-2=.) (-1=.)
recode blackid (1=5) (2=4) (5=1) (4=2)
label var blackid "1= Not Very Imp 2= A little 3= Moderately 4= Very 5= Extremely Important"
codebook ident_blackid blackid

//Latino identity: how important is being Latino 
codebook ident_hispid
gen latinoid = ident_hispid
recode latinoid (-6=.) (-8=.) (-9=.) (-7=.)(-2=.) (-1=.)
recode latinoid (1=5) (2=4) (5=1) (4=2)
label var latinoid "1= Not Very Imp 2= A little 3= Moderately 4= Very 5= Extremely Important"
codebook ident_hispid latinoid


///////////////////////Racial Attitudes///////////////////////////
///Racial Resentment Measures (429 missing cases) 
gen resent_1 = resent_workway
replace resent_1=. if resent_workway<=0
label var resent_1 "Must should work way up without special favors: Agree Strongly (1), Neither (3), Disagree Strongly (5)" 
codebook resent_workway resent_1

gen resent_2 = 6 - resent_slavery
replace resent_2=. if resent_slavery<=0
label var resent_2 "Slavery make more difficult for blacks: Disagree Strongly (1), Neither (3), Agree Strongly (5)" 
codebook resent_slavery resent_2

gen resent_3 = 6 - resent_deserve
replace resent_3=. if resent_deserve<=0
label var resent_3 "Blacks have gotten less than deserve: Disagree Strongly (1), Neither (3), Agree Strongly (5)" 
codebook resent_deserve resent_3

gen resent_4 = resent_try
replace resent_4=. if resent_try<=0
label var resent_4 "Blacks must work harder: Agree Strongly (1), Neither (3), Disagree Strongly (5)" 
codebook resent_try resent_4

////Racial Resentment Index Measure - additive (467 missing cases, if DK/REF for any one question the case was dropped - leading to 18 cases missed with partial data) 
gen rac_resent = resent_1 + resent_2 + resent_3 + resent_4 
codebook rac_resent

//Average measures across 4 measures of racial resentent 
gen rac_resent_avg = (rac_resent)/4 
codebook rac_resent_avg

///A categorical variable for average response to each measure of racial resentment - rounded to closest (1 -5)
gen rac_resent_cat = rac_resent_avg
replace rac_resent_cat=0 if rac_resent_avg<0.5
replace rac_resent_cat=1 if rac_resent_avg>=0.5 & rac_resent_avg<1.5
replace rac_resent_cat=2 if rac_resent_avg>=1.5 & rac_resent_avg<2.5
replace rac_resent_cat=3 if rac_resent_avg>=2.5 & rac_resent_avg<3.5
replace rac_resent_cat=4 if rac_resent_avg>=3.5 & rac_resent_avg<4.5
replace rac_resent_cat=5 if rac_resent_avg>=4.5 & rac_resent_avg<5.5
codebook rac_resent_cat

//Tesler's Racial Resentment Scale 0-1 (0 is most liberal)
//create 0-1 scale for each variable, create additive measure, divide by # of items to get 0-1 scale
///Racial Resentment Measures (429 missing cases)
 
	tab resent_workway //5 is liberal
	gen resent_1T=resent_workway
	recode resent_1T (-6=.) (-7=.)(-8=.) (-9=.) (5=0) (4=.25) (3=.5) (2=.75)
	tab resent_1T

	tab resent_try //5 is liberal
	gen resent_4T = resent_try
	recode resent_4T (-6=.) (-7=.)(-8=.) (-9=.) (5=0) (4=.25) (3=.5) (2=.75)
	tab resent_4T

	tab resent_slavery //1 is liberal
	gen resent_2T=resent_slavery
	recode resent_2T (-6=.) (-7=.)(-8=.) (-9=.) (5=1) (4=.75) (3=.5) (2=.25)(1=0)
	tab resent_2T

	tab resent_deserve //1 is liberal
	gen resent_3T = resent_deserve
	recode resent_3T (-6=.) (-7=.)(-8=.)(-9=.) (-1=.) (5=1) (4=.75) (3=.5) (2=.25) (1=0)
	tab resent_3T

	//create additive measure
	gen rac_tesler = resent_1T + resent_2T + resent_3T + resent_4T
	//divide by # of items to get 0-1 measure
	gen rac_resentment = rac_tesler/4

//////////////////////Demographic Variables/////////////////////////////////////////////

///Gender - Male & Female Dummy Variables 
gen female = gender_respondent_x
replace female= 1 if gender_respondent_x==2
replace female= 0 if gender_respondent_x!=2
label var female "Female (1), Not (0)"
codebook female

gen age_cat = dem_age_r_x
replace age_cat=1 if dem_age_r_x>=18 & dem_age_r_x<=24
replace age_cat=2 if dem_age_r_x>=25 & dem_age_r_x<=44
replace age_cat=3 if dem_age_r_x>=45 & dem_age_r_x<=64
replace age_cat=4 if dem_age_r_x>=65 
replace age_cat=. if dem_age_r_==-2
 codebook age_cat

gen male = gender_respondent_x
replace male= 1 if gender_respondent_x==1
replace male= 0 if gender_respondent_x!=1
label var male "Male (1), Not (0)"
codebook male female 

///Race & Ethnicity dropped 29 cases 
recode dem_raceeth (-9=.) 
codebook dem_raceeth

//Dummy Variable Hispanic (0 missing - 18 DK/REF coded as 0) -1005 cases of Hisp
gen hisp = dem_hisp
replace hisp= 0 if dem_hisp!=1
label var hisp "Hispanic (1), Not (0)" 
codebook hisp dem_hisp

gen white = dem_raceeth_x
replace white=0 if dem_raceeth_x!=1
label var white "White (1), Not (0)"
codebook white dem_raceeth_x

gen black = dem_raceeth_x
replace black=1 if dem_raceeth==2
replace black=0 if dem_raceeth_x!=2
label var black "Black (1), Not (0)"
codebook black dem_raceeth_x

gen asian = dem_raceeth_x
replace asian=1 if dem_raceeth==3
replace asian=0 if dem_raceeth_x!=3
label var asian "Asian (1), Not (0)"
codebook asian dem_raceeth_x

//Level of Education (dropped missing education - 50 cases) 
recode dem_edugroup_x (-9=.) (-2=.)
codebook dem_edugroup_x

tab dem_edugroup_x
gen degree = dem_edugroup_x
recode degree (4=1) (5=1) (3=0) (2=0) (1=0) (-2=0) (-9=0)
codebook degree 


//Married (0 Missing Cases) - spouse present 
gen married = dem_marital
replace married= 0 if dem_marital!=1
label var married "Married (1), Not (0)"
codebook married dem_marital

//Age - Dropped cases where age was missing (60 dropped cases) 
gen age = dem_age_r_x
replace age= . if dem_age_r_x<=0
codebook age dem_age_r_x

///Age Catagorical
gen age_c = age
replace age_c= 1 if age<25
replace age_c= 2 if age>24 & age<35
replace age_c= 3 if age>34 & age<50
replace age_c= 4 if age>49 & age<65
replace age_c= 5 if age>64
label var age_c "18-24 (1), 25- 35 (2), 35 - 49 (3), 50 - 64 (4), 65+ (5)"
codebook age_c

codebook age
gen age2 = age * age
codebook age age2
 
//Veteran (0 missing cases - all DK/REF coded as 0) 
gen vet = dem_veteran 
recode vet (2=0) (-8=0) (-9=0)
label var vet "Veteran (1), Not (0)"
codebook vet

//Employment Status - 13 missing cases 
recode dem_empstatus_1digitfin_x (-8=.) (-9=.)
codebook dem_empstatus_1digitfin_x

//Homemaker - works less than 20 hours outside of the home/week 
gen homemaker = dem_empstatus_1digitfin_x
replace homemaker=1 if dem_empstatus_1digitfin_x==7
replace homemaker=0 if dem_empstatus_1digitfin_x!=7
codebook homemaker 

//Retired
gen retired = dem_empstatus_1digitfin_x
replace retired=1 if dem_empstatus_1digitfin_x==5
replace retired=0 if dem_empstatus_1digitfin_x!=5
codebook retired  

//Unemployed/Laid off
gen unemp = dem_empstatus_1digitfin_x
replace unemp=1 if dem_empstatus_1digitfin_x==2 | dem_empstatus_1digitfin_x==4
replace unemp=0 if dem_empstatus_1digitfin_x==1| dem_empstatus_1digitfin_x>=5
codebook unemp  

///Currently employed by fed, state, or local government 
gen govemp = dem_empgovnow
replace govemp=0 if dem_empgovnow!=1
codebook govemp

///How worried are you about losing your job? (2668 missing cases - only asked of those currently employ or laid off) 
recode dem_losejob (-1=.) (-8=.) (-9=.)
codebook dem_losejob

//Church Attendance (26 missing for DK/REF)
gen church_att = relig_church
replace church_att= 0 if relig_church== 2
replace church_att= . if relig_church<= 0
label var church_att "Attend (1), Not (0)" 
codebook church_att relig_church

//How Often do you attend Church? (34 Missing Cases) 
gen church_attoft = relig_churchoft 
replace church_attoft= 4 if relig_churchoft==1
replace church_attoft= 3 if relig_churchoft==2
replace church_attoft= 2 if relig_churchoft==3
replace church_attoft= 1 if relig_churchoft==4
replace church_attoft= 0 if relig_churchoft==5 | relig_churchoft== -1 & relig_church== 2
replace church_attoft= . if relig_churchoft== -1 & relig_church!= 2
replace church_attoft= . if relig_churchoft== -9
label var church_attoft "5=Every Week; 4= Almost Every Week; 3=Once/Twice a Month; 2=A few times a year; 1=Never"
codebook relig_churchoft church_attoft


//Religious Denomination (86 missing cases)
recode relig_7cat_x (-2=.) 
codebook relig_7cat_x

//Protestant 86 missing cases
gen protestant = relig_7cat_x
replace protestant= 1 if relig_7cat_x<=3
replace protestant= 0 if relig_7cat_x>=4
label var protestant "Protestant (1), Not (0)" 
codebook protestant

///Evangelical 
gen evan = relig_7cat_x
replace evan=1 if relig_7cat_x==2
replace evan=0 if relig_7cat_x!=2
codebook evan

//Catholic 86 missing cases
gen catholic = relig_7cat_x
replace catholic= 1 if relig_7cat_x==4
replace catholic= 0 if relig_7cat_x!=4
label var catholic "Catholic (1), Not (0)"
codebook catholic

//Christian 86 missing cases - includes protestant, catholic, and christian
gen christian = relig_7cat_x
replace christian= 1 if relig_7cat_x<=5
replace christian= 0 if relig_7cat_x>=6
label var christian "Christian (1), Not (0)"
codebook christian

//Jewish 86 missing cases
gen jewish = relig_7cat_x
replace jewish= 1 if relig_7cat_x==6
replace jewish= 0 if relig_7cat_x!=6
label var jewish "Jewish (1), Not (0)"
codebook jewish

//Not Religious 86 missing cases
gen notrelig = relig_7cat_x
replace notrelig= 1 if relig_7cat_x==8
replace notrelig= 0 if relig_7cat_x!=8
label var notrelig "Not Religious (1), Religious (1)" 
codebook notrelig 


///Ideology 
	tab libcpre_self libcpre_choose 
	
	///Has 614 missing cases 
	gen ideo_7 = libcpre_self 
	replace ideo_7= . if libcpre_self<=0
	label var ideo_7 "1=Extremely lib 2= Lib, 3= Slightly lib 4=Moderate 5= Slightly Cons 6=Cons 7=Extremely cons" 
	codebook ideo_7 
	
	//Merged Liberal/Slightly Liberal and Conservative/Slightly Conservative 
	gen ideo_5 = ideo_7
	replace ideo_5= 2 if ideo_7==2 | ideo_7==3
	replace ideo_5= 3 if ideo_7==4
	replace ideo_5= 4 if ideo_7==5 | ideo_7==6
	replace ideo_5= 5 if ideo_7==7
	label var ideo_5 "1=Extremely Lib  2=Liberal  3=Moderate  4=Conservative  5=Extremely Cons"	
	codebook ideo_5
	
	
/*Incorporating cases from both libcpre_self and libcpre_choose to save cases - not working 
	codebook libcpre_self libcpre_choose
	
	gen ideo = libcpre_self 
	replace ideo=1 if libcpre_self==1 
	replace ideo=2 if libcpre_self==2 | libcpre_self==3
	replace ideo=2 if libcpre_self==4 & libcpre_choose==1 | libcpre_self<=0 & libcpre_choose==1 
	replace ideo=4 if libcpre_self==5 | libcpre_self==6
	replace ideo=4 if libcpre_self==4 & libcpre_choose==2 | libcpre_self<=0 & libcpre_choose==2 
	replace ideo=5 if libcpre_self==7
	replace ideo=3 if libcpre_self==4 & libcpre_self==3 | libcpre_self<=0 & libcpre_choose==3
	replace ideo=. if libcpre_self<=0 & libcpre_choose<=-8 
	label var ideo "1=Extremely Liberal 2= Lib 3= Moderate 4= Cons 5= Extremely Conservative" 	
	codebook ideo libcpre_self libcpre_choose  */

	
	gen ideo_3 = ideo_7
	replace ideo_3= 1 if ideo_5==2 
	replace ideo_3= 2 if ideo_5==3
	replace ideo_3= 3 if ideo_5==4 | ideo_5==5 
	label var ideo_3 "1= Liberal 2= Moderate 3= Conservative"	

	
	
	gen conservative = ideo_3
	replace cons=1 if ideo_3==3
	replace cons=0 if ideo_3!=3
	
	
	gen liberal = ideo_3
	replace liberal=1 if ideo_3==1
	replace liberal=0 if ideo_3!=1
	

	gen moderate = ideo_3
	replace moderate=1 if ideo_3==2
	replace moderate=0 if ideo_3!=2	
	
	
codebook ideo_7 ideo_5 ideo_3 libcpre_self liberal conservative moderate 

codebook ideo_7
gen ideo7_sc = (ideo_7/7)
codebook ideo_7 ideo7_sc

codebook ideo_5
gen ideo5_sc = (ideo_5/5)
codebook ideo_5 ideo5_sc

codebook ideo_3
gen ideo3_sc = (ideo_3/3)
codebook ideo_3 ideo3_sc


///Party ID - 24 missing cases
recode pid_x (-2=.)
codebook pid_x

//create party measure 1=dem/lean 2=true indy 3=rep/lean
	tab pid_x
	gen party = pid_x
	replace party=1 if pid_x==1|pid_x==2|pid_x==3
	replace party=3 if pid_x==5|pid_x==6|pid_x==7
	replace party=2 if pid_x==4
	label var party "Democrat (1), Indep (2), Republican (3)" 
	tab party

//Party ID (5 point scale) (24 missing cases) 
	gen party_5 = pid_x
	replace party_5=1 if pid_x==1
	replace party_5=2 if pid_x==2|pid_x==3
	replace party_5=3 if pid_x==4 
	replace party_5=4 if pid_x==5|pid_x==6
	replace party_5=5 if pid_x==7
	replace party_5=. if pid_x<=0
	label var party_5 "Strong Democrat (1), Weak Dem (2), Indep (3), Weak Rep (4), Strong Republican (5)" 
	codebook party party_5


//Democrat Dummy (0 missing - Moderates and DK were coded 0)
gen dem = pid_x
replace dem= 1 if pid_x==1 | pid_x==2 | pid_x==3 
replace dem= 0 if pid_x>=4 | pid_x==-2 
label var dem "Democrat (1), Not (0)" 
codebook dem pid_x

//Republican Dummy (0 missing - Moderates and DK were coded 0)
gen rep = pid_x
replace rep= 1 if pid_x>=5 & pid_x!=.
replace rep= 0 if pid_x<=4 | pid_x==. 
label var rep "Republican (1), Not (0)"
codebook rep pid_x


gen indep= party_5
replace indep=1 if party_5==3
replace indep=0 if party_5!=3
codebook indep rep dem party_5 party

codebook party_5
gen strpty = party_5
replace strpty= 2 if party_5== 5 | party_5==1
replace strpty= 1 if party_5==4 | party_5==2
replace strpty= 0 if party_5==3

codebook party_5 strpty

gen strrep = party_5
replace strrep= 2 if party_5==5
replace strrep= 1 if party_5==4
replace strrep= 0 if party_5<=3

gen strdem = party_5
replace strdem= 2 if party_5==1
replace strdem= 1 if party_5==2
replace strdem= 0 if party_5>=3

codebook strdem strrep strpty party_5

//Tea Supporter
gen teasup = tea_supp
replace teasup= 0 if tea_supp!=1
label var teasup "Tea Supporter (1), Not (0)" 
codebook teasup tea_supp

//recode teaparty support to align with Barreto (DK & ReF coded as missing) 
tab teasup
tab tea_supp_x
gen teaparty=tea_supp_x
recode teaparty (-8=.) (-9=.) (2=1) (3=1) (4=0) (5=0) (6=0) (7=0)
codebook teaparty

////////////Economic Measures - Wealth, Occupation, and Perceived Status///////////////////// 

//Income (INC)(WEALTH) - both CASI (520 Missing Cases) 
recode inc_incgroup_pre (-2=.) 
codebook inc_incgroup_pre 

//Income (somewhat continuous by 2500, 5000, 10000 intervals) (199 missing cases of DK/REF) 
recode incgroup_prepost_x (-8=.) (-9=.)
codebook incgroup_prepost_x 


//income levels 1=250k plus 2=100k to 250k 3=50k to 100k 4=25k to 50k 5= less than 25k
gen incgroup_cat = incgroup_prepost_x
replace incgroup_cat=. if incgroup_prepost_x<=0
replace incgroup_cat=5 if incgroup_prepost_x==28
replace incgroup_cat=4 if incgroup_prepost_x<=27 & incgroup_prepost_x>=23
replace incgroup_cat=3 if incgroup_prepost_x<=22 & incgroup_prepost_x>=15
replace incgroup_cat=2 if incgroup_prepost_x<=14 & incgroup_prepost_x>=09
replace incgroup_cat=1 if incgroup_prepost_x<=08 & incgroup_prepost_x>=01
codebook incgroup_cat

//above or below median income
gen incgroup_median = incgroup_prepost_x
replace incgroup_median=. if incgroup_prepost_x<=0
replace incgroup_median=0 if incgroup_prepost_x<=14 & incgroup_prepost_x>=1
replace incgroup_median=1 if incgroup_prepost_x<=28 & incgroup_prepost_x>=15

//top one percent
gen incgroup_onepercent = incgroup_prepost_x
replace incgroup_onepercent=. if incgroup_prepost_x<=0
replace incgroup_onepercent=1 if incgroup_prepost_x==28
replace incgroup_onepercent=0 if incgroup_prepost_x<=27 & incgroup_prepost_x>=1

//below poverty line
gen incgroup_poverty = incgroup_prepost_x
replace incgroup_poverty=. if incgroup_prepost_x<=0
replace incgroup_poverty=1 if incgroup_prepost_x<=8 & incgroup_prepost_x>=1
replace incgroup_poverty=0 if incgroup_prepost_x>=9

//middle class 40k to 125k
gen incgroup_middle=incgroup_prepost_x
replace incgroup_middle=. if incgroup_prepost_x
replace incgroup_middle=1 if incgroup_prepost_x>=13 & incgroup_prepost_x<=25
replace incgroup_middle=0 if incgroup_prepost_x>=13 & incgroup_prepost>=25
replace incgroup_middle=0 if incgroup_prepost_x<=12
tab incgroup_middle

//class measure using income/education to create middle class (degree + middle income)
gen middleclass=.
replace middleclass=1 if degree==1 & incgroup_middle==1
replace middleclass=0 if degree==0 & incgroup_middle==1
replace middleclass=0 if incgroup_middle==0
tab middleclass

//class measure using income/education to create working class (no degree + middle income)
gen workingclass=.
replace workingclass=1 if degree==0 & incgroup_middle==1
replace workingclass=0 if degree==1 & incgroup_middle==1
replace workingclass=0 if incgroup_middle==0
tab workingclass

//using reported perceptions to form middle class
gen repclassmid = dem_whichclass
replace repclassmid=. if dem_whichclass<-7
replace repclassmid=1 if dem_whichclass==1
replace repclassmid=0 if dem_whichclass>=2
replace repclassmid=. if dem_chclass<-2
replace repclassmid=1 if dem_chclass==1
replace repclassmid=0 if dem_chclass>=2
replace repclassmid=. if repclassmid==-1
tab repclassmid

//using reported perceptions to form working class
gen repclasswork = dem_whichclass
replace repclasswork=. if dem_whichclass<-7
replace repclasswork=1 if dem_whichclass==2
replace repclasswork=0 if dem_whichclass==1|dem_whichclass==0
replace repclasswork=0 if dem_whichclass>=3
replace repclasswork=. if dem_chclass<-2
replace repclasswork=1 if dem_chclass==2
replace repclasswork=0 if dem_chclass>=3
replace repclasswork=0 if dem_chclass==1
replace repclasswork=. if repclasswork==-1

corr middleclass repclassmid if white==1
corr workingclass repclasswork if white==1

///Wealth - Investments in the Stock Market (DK, NO, REf coded 0 - no missing cases) 
gen wealth_stock_d = wealth_stocks
replace wealth_stock_d=. if wealth_stocks!=1
label var wealth_stock_d "Invested in Stock Market (1), Not (0)"
codebook wealth_stock_d wealth_stocks

//Union Household (DK/Ref coded as 0) 
gen union = dem_unionhh
replace union= 0 if dem_unionhh== 2 | dem_unionhh<0
label var union "Member of Household in Union (1), Not (0)" 
codebook union dem_unionhh

///Neeeded to create variable to create single dummy variable for middle class 
gen wrkcl_1 = dem_whichclass
replace wrkcl_1= 99 if dem_whichclass== -1
replace wrkcl_1= 0 if dem_whichclass<= -8 | dem_whichclass>=3 | dem_whichclass==0 
codebook wrkcl_1 dem_whichclass

//Dummy Variable for working class including dem_chclass & dem_whichclass 
gen wrkcl = wrkcl_1
replace wrkcl= 1 if wrkcl_1==2 | wrkcl_1== 99 & dem_chclass== 2
replace wrkcl= 0 if wrkcl_1==1 | wrkcl_1== 99 & dem_chclass!= 2
codebook wrkcl wrkcl_1 dem_whichclass dem_chclass

//Dummy Variable for middle class including dem_chclass & dem_whichclass 
gen midcl = wrkcl_1
replace midcl= 1 if wrkcl_1==1 | wrkcl_1== 99 & dem_chclass== 1
replace midcl= 0 if wrkcl_1==2 | wrkcl_1== 99 & dem_chclass!= 1
codebook midcl wrkcl wrkcl_1 dem_whichclass dem_chclass

//Own Home (DK/Ref coded as 0)
gen ownhome = dem3_ownhome
replace ownhome=0 if dem3_ownhome!=1
label var ownhome "Own Home (1), Not (0)"
codebook ownhome dem3_ownhome

///Variable for Residential Mobility/Stability (How long have you lived within
//the same community)

codebook dem3_yearscomm
gen resmobil = dem3_yearscomm
replace resmobil = . if dem3_yearscomm<=0
codebook dem3_yearscomm resmobil

//Variable for Residential Mobility/Stability - how long have you lived at 
//current address (as opposed to within the same community)

gen resimobi = dem3_lenaddr
replace resimobi= . if dem3_lenaddr<=0
replace resimobi= 4 if dem3_lenaddr==5
replace resimobi= 5 if dem3_lenaddr>=6
codebook resimobi dem3_lenaddr

gen resimobi_sc = (resimobi/5)
codebook resimobi_sc resimobi 


//Personal Financial Situation - better or worse off  (67 missing cases)
recode finance_finpast_x (-8=.) (-9=.)
codebook finance_finpast_x

//Income Inequality - getting better or worse (116 missing cases) 
recode ineq_incgap_x (-8=.) (-9=.)
codebook ineq_incgap_x

//State of the economy (34 missing cases - DK/REF)
recode econ_ecnow (-8=.) (-9=.)
codebook econ_ecnow

//Is the economy today better than a 1 year ago? (43 missing cases) 
recode econ_ecpast_x (-8=.) (-9=.)
codebook econ_ecpast_x

//Is unemployment today better than a 1 year ago? (52 missing cases) 
recode econ_unpast_x (-8=.) (-9=.)
codebook econ_unpast_x

//Will unemployment be better or worse in 1 year (106 missing cases)
recode econ_unnext (-8=.) (-9=.)
codebook econ_unnext

///Govt should take action to resolve income differences (471 missing cases)
recode cses_govtact (-6=.) (-7=.)(-8=.)(-9=.)
codebook cses_govtact 

//Economy better or worse in past 12 months (429 missing cases)
recode cses_econ (-8=.) (-9=.)(-7=.)(-6=.)
codebook cses_econ 

//Liklihood that one will improve their standard of living in next 10 years(444 missing cases)
recode cses_impstdliv (-8=.) (-9=.)(-6=.) (-7=.)
codebook cses_impstdliv 



////////////Political Behavior and Engagement/////////////////////////

//Presidential Vote in 2012
	gen prezvote2012 = presvote2012_x
	replace prezvote2012=. if presvote2012_x<=0
	replace prezvote2012=. if presvote2012_x==5

codebook prezvote2012

///Voted for Obama - DK, REF, Other Candidate, Inapplicable removed
	gen vote_obama12 = presvote2012_x
	replace vote_obama12=0 if presvote2012_x==2
	replace vote_obama12=. if presvote2012_x==5
	replace vote_obama12=. if presvote2012_x<=0
	codebook vote_obama12

	
//Presidential Vote in 2008
	gen prezvote2008 = interest_whovote2008
	replace prezvote2008=. if interest_whovote2008<=0
	replace prezvote2008=. if interest_whovote2008==5
	codebook prezvote2008

///Voted for Obama 08 - DK, REF, Inapplicable removed	
	gen vote_obama08 = prezvote2008
	replace vote_obama08=0 if interest_whovote2008==2 | interest_whovote2008==5
	replace vote_obama08=. if interest_whovote2008<=0
	codebook vote_obama08	
	
///Interest in Politics - (3 missing cases - DK, REF) 
recode interest_attention (-8=.) (-9=.)
codebook interest_attention

recode interest_voted2008 (-8=.) (-9=.)
codebook interest_voted2008

//Voted in 2008 - Voted in 2008 (DK and Ref removed 22 cases) 
gen rvote2008_x = interest_voted2008
replace rvote2008_x=0 if interest_voted2008==2
label var rvote2008_x "Voted in 2008 (1), Did not (0)" 
codebook interest_voted2008 rvote2008_x


///Voted for Obama in 2008- among those who voted (65 missing - DK, REF)
gen vote_obama08_ifvote = interest_whovote2008
replace vote_obama08_ifvote= 0 if interest_whovote2008>=2 | interest_whovote2008== -1
replace vote_obama08_ifvote= . if interest_whovote2008<=-8 | interest_whovote2008== -1
label var vote_obama08_ifvote "Among those who Voted, chose Obama (1), Not (0)" 
codebook vote_obama08_ifvote interest_whovote2008 vote_obama08

///Voted for Obama in 2008- among those who voted-no missing cases (65 cases of DK, REF coded as 0)
gen vote_obama08_ifvote_nomis = interest_whovote2008
replace vote_obama08_ifvote_nomis= 0 if interest_whovote2008>=2 | interest_whovote2008<=-8
replace vote_obama08_ifvote_nomis= . if interest_whovote2008== -1
label var vote_obama08_ifvote_nomis "Among those who voted, chose Obama (1), Not (0)- No Missing Cases" 
codebook vote_obama08_ifvote_nomis interest_whovote2008

///Voted for Obama in 2008 (AMong the entire population voted for Obama - 0 is else (didn't vote, DK, REf, Other Cand)
gen vote_obama08_d = interest_whovote2008
replace vote_obama08_d= 0 if interest_whovote2008!=1
label var vote_obama08_d "Among entire population, voted for Obama (1), Else (0)" 

codebook interest_whovote2008 vote_obama08_ifvote_nomis vote_obama08_ifvote vote_obama08_d 

//Voted for Obama in 2012
gen vote_obama12_ifvote = presvote2012_x
replace vote_obama12_ifvote= 1 if presvote2012_x==1
replace vote_obama12_ifvote= 0 if presvote2012_x==2 | presvote2012_x==5 
replace vote_obama12_ifvote= . if presvote2012_x<=0
label var vote_obama12_ifvote "Among those who Voted, chose Obama (1), Not (0)" 

//Voted for Obama in 2012 - coded DK/REF/3rd Party as 0 (would save 961 cases - assuming DK/REf did not vote for Obama)
gen vote_obama12_ifvote_nomis = presvote2012_x
replace vote_obama12_ifvote_nomis= 1 if presvote2012_x==1
replace vote_obama12_ifvote_nomis= 0 if presvote2012_x==2 | presvote2012_x==5  | presvote2012_x==-9
replace vote_obama12_ifvote_nomis= . if presvote2012_x==-2 | presvote2012_x==-6
label var vote_obama12_ifvote_nomis "Among those who Voted, chose Obama (1), Not (0) - No Missing" 

//Voted for Obama in 2012 - 0 missing cases (didn't vote, DK, REf, Other Cand all coded to 0)
gen vote_obama12_d = presvote2012_x
replace vote_obama12_d= 1 if presvote2012_x==1
replace vote_obama12_d= 0 if presvote2012_x!=1
label var vote_obama12_d "Among entire population, voted for Obama (1), Else(0)" 

codebook presvote2012_x prezvote2012 vote_obama12_ifvote vote_obama12_ifvote_nomis vote_obama12_d

//Postetlection questions on voting (404 missing cases) 
recode rvote2012_x (-6=.) (-9=.) (-2=.) (2=0) 
codebook rvote2012_x

//Voted in Primary/Caucus in 2012 (43 missing cases - DK,REF - if not coded as 0)
recode prevote_primv (2=0) (-8=.) (-9=.)
label var prevote_primv "Voted in Primary in 2012 (1), Else (0)"
codebook prevote_primv

///Mobilized by Political Party (400+ missing cases) 
gen mob = cses_contct
replace mob=0 if cses_contct==2
replace mob=. if cses_contct<=0
label var mob "Conatacted (1), Not (0)" 
codebook cses_contct mob

///Did you attend a poltical event (400+ missing cases)
gen attend_polevent = mobilpo_rally 
replace attend_polevent=0 if mobilpo_rally==2
replace attend_polevent=. if mobilpo_rally<=0
label var attend_polevent "Attended a political event (1), Not (0)"
codebook attend_polevent mobilpo_rally


///Did you contribute $ to candidate or party (405 missing cases) 
gen contr_money = mobilpo_ctbcand
replace contr_money=1 if mobilpo_ctbcand==1 | mobilpo_ctbpty==1
replace contr_money=0 if mobilpo_ctbcand==2 & mobilpo_ctbpty!=1
replace contr_money=. if mobilpo_ctbcand<=0 | mobilpo_ctbpty<=0
label var contr_money "Contributed $ to party or candid (1), Not (0)"
codebook contr_money 


//How many days a week do you use social media to learna about presidential election? (147 missing cases) 
recode medsrc_socmedia (-4=.) (-8=.) (-9=.)

//How many days a week do you use blogs to learn about presidential election? (219 missing cases) 
recode medsrc_blogs (-4=.) (-8=.) (-9=.)


//////Attitudes toward Candidates, Parties, and Government/////////////////////////// 

//Barack Obama is Muslim (20%)
gen obama_muslim = candrel_dpc
replace obama_muslim=1 if candrel_dpc==4
replace obama_muslim=0 if candrel_dpc!=4
label var obama_muslim "Obama a Muslim (1), Not (0)"
codebook obama_muslim candrel_dpc

//Was Obama born in the US - dummy (404 missing cases) 
gen obama_bornus = nonmain_born
replace obama_bornus=0 if nonmain_born>=2
replace obama_bornus=. if nonmain_born==-6
replace obama_bornus=. if nonmain_born==-7
replace obama_bornus=0 if nonmain_born==-8 | nonmain_born==-9
label var obama_muslim "Obama born in US (1), Not (0)"
codebook nonmain_born obama_bornus

//Congressional Approval/Disapprobal (386 DK/REF - coded as 0)
gen cong_app = congapp_job
replace cong_app= 0 if congapp_job!=1
label var cong_app "Approve of Cong (1), Not (0)"
codebook cong_app congapp_job

//Presidential Approval (132 DK/REF - coded as 0)
gen pres_app = presapp_job 
replace pres_app = 0 if presapp_job!=1
label var cong_app "Approve of President (1), Not (0)"
codebook pres_app presapp_job

//Presidential Approval (132 DK/REF - coded as 0)
gen pres_econ = presapp_econ 
replace pres_econ = 0 if presapp_econ!=1
label var pres_econ "Approve of Obama's Handling of Economy (1), Not (0)"
codebook pres_econ presapp_econ

//Presidential Approval (132 DK/REF - coded as 0)
gen pres_hlth = presapp_health 
replace pres_hlth = 0 if presapp_health!=1
label var pres_econ "Approve of Obama's Handling of Healh Care (1), Not (0)"
codebook pres_hlth presapp_health


//How much is Obama to blame for economic conditions? (82 missing cases) 
recode ecblame_pres (-8=.) (-9=.)
codebook ecblame_pres

//Candidate Feeling Thermometers

//Clinton (28 missing cases)
recode ft_hclinton (-8=.) (-9=.) (-2=.)
codebook ft_hclinton 

//Obama (15 missing cases)
recode ft_dpc (-8=.) (-9=.) (-2=.)
codebook ft_dpc

//Romney (52 missing cases)
recode ft_rpc (-8=.) (-9=.) (-2=.)
codebook ft_rpc

//Democratic party (58 missing cases)
recode ft_dem (-8=.) (-9=.) (-2=.)
codebook ft_dem

//Republican Party (63 missing cases) 
recode ft_rep (-8=.) (-9=.) (-2=.)
codebook ft_rep

/////////////Policy Attitudes////////////////////////////////////////////

//Abortion
//dropped 487; All those who favor choice for women coded as 3, All those oppose coded as 1
gen choice = abort_choice_x
replace choice=3 if abort_choice_x==1
replace choice=3 if abort_choice_x==2
replace choice=3 if abort_choice_x==3
replace choice=3 if abort_choice_x==4
replace choice=2 if abort_choice_x==5
replace choice=1 if abort_choice_x==6
replace choice=1 if abort_choice_x==7
replace choice=1 if abort_choice_x==8
replace choice=1 if abort_choice_x==9
replace choice=. if abort_choice_x<=0
label var choice "Pro-choice (3), Pro-life(1)" 
codebook abort_choice_x choice


//OBama's policies favored Blacks (404 missing cases) 
gen obama_bias = nonmain_bias
replace obama_bias= 1 if nonmain_bias==2
replace obama_bias= 0 if nonmain_bias==1 | nonmain_bias==3  | nonmain_bias<=-8
replace obama_bias=. if nonmain_bias==-6 | nonmain_bias==-7
codebook nonmain_bias obama_bias

//Obamacare (73 missing cases)
recode health_2010hcr_x (-8=.) (-9=.)
codebook health_2010hcr_x

///Gun Control (0 missing cases - 24 DK/ref coded 0)
gen gun_morediff = gun_control
replace gun_morediff= 0 if gun_control<=0 | gun_control>=2 
label var gun_morediff "Make it more difficult to buy a gun (1), Not (0)" 
codebook gun_morediff gun_control 

///Attitudes toward Immigration Policy (47 missing cases) 
recode immig_policy (-8=.) (-9=.)
codebook immig_policy

//Attitudes toward Immigration Policy (send all unauthorized immigrants back 47 missing cases)
gen immig_sendback = immig_policy
replace immig_sendback=0 if immig_policy!=1
codebook immig_sendback immig_policy

//Attitudes toward the Dream Act (0 missing cases - 30 DK/REF coded 0)
gen immig_dreamact = immig_citizen
replace immig_dreamact= 0 if immig_citizen!=1
codebook immig_dreamact immig_citizen

//Attitudes toward Immigration Checks (0 missing cases - 61 DK/REf coded 0)
gen support_immigchecks = immig_checks 
replace support_immigchecks= 0 if immig_checks!=1
codebook support_immigchecks immig_checks 

///(FAIRJOB)- should government ensure fair treatment to blacks in employment

recode aidblack_self (-8=.) (-9=.)(-2=.)
codebook aidblack_self

//Opposition to Affirmative Action in Universities (90 missing cases- DK/REF)
recode aa_uni_x (-8=.) (-9=.)(-2=.)(-1=.)
codebook aa_uni_x

//Opposition to Affirmative Action in Universities (75 missing cases- DK/REF)
recode aa_work_x (-8=.) (-9=.)(-2=.)(-1=.)
codebook aa_work_x

//Increased Spending on Crime Prevention (0 Missing Cases) 
gen fedspend_crime_d = fedspend_crime
replace fedspend_crime_d= 0 if fedspend_crime!=1
label var fedspend_crime_d "Increase federal spending to deal with crime (1), Not (0)"
codebook fedspend_crime fedspend_crime_d

///Appropriate levels of spending on crime enforcement (452 missing cases) 
recode cses_exppolc (-8=.) (-9=.)(-7=.)(-6=.)
codebook cses_exppolc

//Increased Spending on Welfare (0 Missing Cases) 
gen fedspend_welfare_d = fedspend_welfare
replace fedspend_welfare_d= 0 if fedspend_welfare!=1
label var fedspend_welfare_d "Increase fed spending for welfare (1), Not (0)" 
codebook fedspend_welfare fedspend_welfare_d

///Appropriate levels of spending on welfare (471 missing cases)
recode cses_expwelf (-8=.) (-9=.)(-7=.)(-6=.)
codebook cses_expwelf 

//Increased Spending on the Poor (0 Missing Cases) 
gen fedspend_poor_d = fedspend_poor
replace fedspend_poor_d= 0 if fedspend_poor!=1
codebook fedspend_poor fedspend_poor_d


///////////////////////////Measures of Trust in Government //////////////////////////////////////

//How often do you trust govt in Wash to do what is right? (3042 missing casses) 
gen trust_fedgov = trustgov_trustgrev
replace trust_fedgov=. if trustgov_trustgrev<=0
label var trust_fedgov "Always (1), Most of Time (2), Some of time (4), Never (5)" 
codebook trust_fedgov
codebook trustgov_trustgstd

/*How often trustgov_trustgstd- about 2900 missing cases eliminate -1 -8, -9 - reverse order of other
trustgov_trustgstd- about 2900 missing cases eliminate -1 -8, -9  */
gen trust_bigint = trustgov_bigintrst
replace trust_bigint= 0 if trustgov_bigintrst!=1
codebook trust_bigint trustgov_bigintrst

//How much does government waste tax money? (eliminated Dk/Ref - 49 missing cases) 
recode trustgov_waste (-8=.) (-9=.) 
codebook trustgov_waste

//How many in government are corrupt? (5 point ordinal measure -115 mising cases -DK/REf)
recode trustgov_corrpt (-8=.) (-9=.)
codebook trustgov_corrpt


//////////////////////////Measures of Patriotism - 2 separate measures/////////////////////
//How does the American flag make you feel - 448 missing cases - eliminated 
recode patriot_flag (-6=.) (-7=.) (-8=.) (-9=.) 

///How much love do you have for your country? - 418 missing cases - eliminated 
recode patriot_love (-6=.) (-7=.) (-8=.) (-9=.) 


//Government Role/Size - Ideology --6, -7, -8, -9, also 3 and 4 voluntarily said both or neither all eliminated 

recode govrole_regbus (-6=.) (-7=.) (-8=.) (-9=.) /*482 missing cases*/

///Creating an additive index measure - changed direction of a couple and eliminated missing cases 
recode govrole_big (2=0) (-6=.) (-7=.) (-8=.) (-9=.)   /*474 missing cases*/
recode govrole_market (2=1) (1=0) (-6=.) (-7=.) (-8=.) (-9=.)   /*500 missing cases*/
recode govrole_lessmore (2=0) (-6=.) (-7=.) (-8=.) (-9=.)   /*523 missing cases*/

gen govrole_index = govrole_market + govrole_lessmore + govrole_big /* 599 missing cases*/
codebook govrole_index

codebook govrole_regbus govrole_big govrole_market govrole_lessmore govrole_index
 

///Moral Traditionalism (444 missing cases) -reversed order of two; eliminated -6, -7, -8, -9 - 4; constructed additive index score -same as literature

recode trad_adjust (1=5) (2=4) (4=2) (5=1)
recode trad_adjust (-6=.) (-7=.) (-8=.) (-9=.)
recode trad_tolerant (1=5) (2=4) (4=2) (5=1)
recode trad_tolerant (-6=.) (-7=.) (-8=.) (-9=.)
recode trad_famval (-6=.) (-7=.) (-8=.) (-9=.)
recode trad_lifestyle (-6=.) (-7=.) (-8=.) (-9=.)

gen moral_trad = (trad_adjust + trad_tolerant + trad_famval + trad_lifestyle)/4
codebook moral_trad

gen moral_trad_cat = moral_trad
replace moral_trad_cat=0 if moral_trad<0.5
replace moral_trad_cat=1 if moral_trad>=0.5 & moral_trad<1.5
replace moral_trad_cat=2 if moral_trad>=1.5 & moral_trad<2.5
replace moral_trad_cat=3 if moral_trad>=2.5 & moral_trad<3.5
replace moral_trad_cat=4 if moral_trad>=3.5 & moral_trad<4.5
replace moral_trad_cat=5 if moral_trad>=4.5 & moral_trad<5.5
codebook moral_trad_cat

//Authoritarianism index measure--6, -7, -8, -9, also 3 and 4 voluntarily said both or neither all eliminated 

recode auth_ind (2=1) (1=0) (3=.) (4=.) (-6=.) (-7=.) (-8=.) (-9=.)
recode auth_cur (2=1) (1=0) (3=.) (4=.) (-6=.) (-7=.) (-8=.) (-9=.)
recode auth_obed (2=0) (3=.) (4=.) (-6=.) (-7=.) (-8=.) (-9=.)
recode auth_consid (2=1) (1=0) (3=.) (4=.) (-6=.) (-7=.) (-8=.) (-9=.)
codebook auth_ind auth_cur auth_obed auth_consid 

///Authoritarianism - index additive scale (add the four measures/all . were eliminate) - 873 missing variables 
//could code Dk/REf/Both for each measure as 0 rather than . to save cases
gen author = (auth_ind + auth_cur + auth_obed + auth_consid)/4
codebook author 


												///Racial Attitudes 

///Stereotype Indexes 
///Measuring stereotypes toward Whites (0 -1 additive index measures combining questions on hard work and intelligence of whites) (460 missing cases) 
recode stype_hwkwhite (-6=.) (-8=.) (-9=.) (-7=.)
codebook stype_hwkwhite 

recode stype_intwhite (-6=.) (-8=.) (-9=.) (-7=.)
codebook stype_intwhite 

gen stype_whites = (stype_intwhite + stype_hwkwhite)/14
label var stype_whites "1=High Endorsement of Negative Steretypes 0=Low" 
codebook stype_whites

///Measuring stereotypes toward Blacks (0 -1 additive index measures combining questions on hard work and intelligence of whites) (460 missing cases)
recode stype_hwkblack (-6=.) (-8=.) (-9=.) (-7=.)
codebook stype_hwkblack 

recode stype_intblack (-6=.) (-8=.) (-9=.) (-7=.)
codebook stype_intblack 

gen stype_blacks = (stype_intblack + stype_hwkblack)/14
label var stype_blacks "1=High Endorsement of Negative Steretypes 0=Low" 
codebook stype_blacks
gen blackstereotypes = stype_blacks

///Measuring stereotypes toward Hispanics (0 -1 additive index measures combining questions on hard work and intelligence of whites) (460 missing cases)
recode stype_hwkhisp (-6=.) (-8=.) (-9=.) (-7=.)
codebook stype_hwkhisp 

recode stype_inthisp (-6=.) (-8=.) (-9=.) (-7=.)
codebook stype_inthisp 

gen stype_hisp = (stype_inthisp + stype_hwkhisp)/14
label var stype_hisp "1=High Endoresement of Negative Steretypes; 0=Low" 
codebook stype_hisp

///Measuring stereotypes toward Hispanics (0 -1 additive index measures combining questions on hard work and intelligence of whites) (460 missing cases)
recode stype_hwkasian (-6=.) (-8=.) (-9=.) (-7=.)
codebook stype_hwkasian 

recode stype_intasian (-6=.) (-8=.) (-9=.) (-7=.)
codebook stype_intasian 

gen stype_asian = (stype_intasian + stype_hwkasian)/14
label var stype_asian "1=High Endoresement of Negative Steretypes; 0=Low" 
codebook stype_asian

//Racial Affect Measures (Tessler)  
///Feeling Thermometer toward Whites (0 -100) - 461 missing cases
recode ftcasi_white (-6=.) (-8=.) (-9=.) (-7=.)(-2=.) (-1=.)
codebook ftcasi_white

///White Affect Measure (Feeling thermometer scaled to 0 -1)
gen white_affect = (ftcasi_white)/100
codebook white_affect

///Feeling Thermometer toward Blacks (0 -100) - 464 missing cases
recode ftcasi_black (-6=.) (-8=.) (-9=.) (-7=.)(-2=.) (-1=.)
codebook ftcasi_black

///How often do you have sympathy for Blacks (441 missing cases)

recode racecasi_sympblacks (-6=.) (-8=.) (-9=.) (-7=.)
gen sympblacks_rev = racecasi_sympblacks
replace sympblacks_rev=5 if racecasi_sympblacks==1
replace sympblacks_rev=4 if racecasi_sympblacks==2
replace sympblacks_rev=2 if racecasi_sympblacks==4
replace sympblacks_rev=1 if racecasi_sympblacks==5
label var sympblacks_rev "5=Always 4=Most of time 3=About Half 2=Sometimes 1=Never"
codebook racecasi_sympblacks sympblacks_rev

///How often do you have you felt admiration for Blacks (436 missing cases)
recode racecasi_admblacks (-6=.) (-8=.) (-9=.) (-7=.)
gen admblacks_rev = racecasi_admblacks
replace admblacks_rev=5 if racecasi_admblacks==1
replace admblacks_rev=4 if racecasi_admblacks==2
replace admblacks_rev=2 if racecasi_admblacks==4
replace admblacks_rev=1 if racecasi_admblacks==5
label var sympblacks_rev "5=Always 4=Most of time 3=About Half 2=Sometimes 1=Never"
codebook racecasi_admblacks admblacks_rev


///Black Affect Measure (Scaled from 0 -1; combines feeling thermometer and sympathy and admiration for blacks) 
gen black_affect = ((ftcasi_black) + (racecasi_sympblacks * 20) + (racecasi_admblacks * 20))/300
codebook black_affect 

//Attitudes toward groups: Coded them all in the same direction- all have 450 missing cases and dropped DK/REF 

///Influence of Blacks (447 missing cases)
recode racecasi_infblacks (-6=.) (-8=.) (-9=.) (-7=.)
codebook racecasi_infblacks

///INfluence of Hispanics (444 missing cases)
recode racecasi_infhisp (-6=.) (-8=.) (-9=.) (-7=.)
codebook racecasi_infhisp

//Influence of Whites (438 missing cases)
recode racecasi_infwhite (-6=.) (-8=.) (-9=.) (-7=.)
codebook racecasi_infwhite 


////Measures of Discriminaiton 
//discrimination against whites dropped 448

gen white_discrim = (5- discrim_whites) 
recode white_discrim (14=.) (12=.) (11=.) 
label var white_discrim "Amt of Discrim: A great deal (4), A lot (3), Mod Amt (2), A little (1), None(0)"
codebook discrim_whites white_discrim 

gen black_discrim = (5- discrim_blacks) 
recode black_discrim (14=.) (12=.) (11=.) 
label var black_discrim "Amt of Discrim: A great deal (4), A lot (3), Mod Amt (2), A little (1), None(0)"
codebook discrim_blacks black_discrim 

gen latino_discrim = (5- discrim_hispanics) 
recode latino_discrim (14=.) (12=.) (11=.) 
label var latino_discrim "Amt of Discrim: A great deal (4), A lot (3), Mod Amt (2), A little (1), None(0)"
codebook discrim_hispanics latino_discrim 


//discrimination against self - how much disc respondent felt 
//dropped 423
recode discrim_self (-6=.) (-8=.) (-9=.) (-7=.)
codebook discrim_self 

//Importance one gives to distinct Identities - For Whites 

//white identity: how important is being white 
//dropped 1887 - 455 not asked or refused 
recode ident_whiteid (-6=.) (-8=.) (-9=.) (-7=.)(-2=.) (-1=.)
codebook ident_whiteid 

//American identity
//dropped 422
recode patriot_amident (-6=.) (-8=.) (-9=.) (-7=.)(-2=.) (-1=.)
codebook patriot_amident 

//Religious Identity 
//dropped 510
recode ident_religid (-6=.) (-8=.) (-9=.) (-7=.)(-2=.) (-1=.)
codebook ident_religid



//Feeling Thermometer for groups//////////////////

///Feeling Thermometer toward Whites (0 -100) - 461 missing cases
recode ftcasi_white (-6=.) (-8=.) (-9=.) (-7=.)(-2=.) (-1=.)
codebook ftcasi_white

///Feeling Thermometer toward Blacks (0 -100) - 464 missing cases
recode ftcasi_black (-6=.) (-8=.) (-9=.) (-7=.)(-2=.) (-1=.)
codebook ftcasi_black

///Feeling Thermometer toward Hispanics (0 -100) - 465 missing cases
recode ftcasi_hisp (-6=.) (-8=.) (-9=.) (-7=.)(-2=.) (-1=.)
codebook ftcasi_hisp

///Feeling Thermometer toward Asians (0 -100) - 463 missing cases
recode ftcasi_asian(-6=.) (-8=.) (-9=.) (-7=.)(-2=.) (-1=.)
codebook ftcasi_asian

///Feeling Thermometer toward Illegals (0 -100) - 456 missing cases 
recode ftcasi_illeg (-6=.) (-8=.) (-9=.) (-7=.)(-2=.) (-1=.)
codebook ftcasi_illeg


///Creating Categorical Variables for each feeling thermometer measure 
gen ftcasi_white_cat = ftcasi_white
replace ftcasi_white_cat= 0 if ftcasi_white>=0 & ftcasi_white<25
replace ftcasi_white_cat= 1 if ftcasi_white>=25 & ftcasi_white<50
replace ftcasi_white_cat= 2 if ftcasi_white>=50 & ftcasi_white<75
replace ftcasi_white_cat= 3 if ftcasi_white>=75 & ftcasi_white<=100
codebook ftcasi_white_cat

gen ftcasi_black_cat = ftcasi_black
replace ftcasi_black_cat= 0 if ftcasi_black>=0 & ftcasi_black<25
replace ftcasi_black_cat= 1 if ftcasi_black>=25 & ftcasi_black<50
replace ftcasi_black_cat= 2 if ftcasi_black>=50 & ftcasi_black<75
replace ftcasi_black_cat= 3 if ftcasi_black>=75 & ftcasi_black<=100
codebook ftcasi_black_cat 

gen ftcasi_hisp_cat = ftcasi_hisp
replace ftcasi_hisp_cat= 0 if ftcasi_hisp>=0 & ftcasi_hisp<25
replace ftcasi_hisp_cat= 1 if ftcasi_hisp>=25 & ftcasi_hisp<50
replace ftcasi_hisp_cat= 2 if ftcasi_hisp>=50 & ftcasi_hisp<75
replace ftcasi_hisp_cat= 3 if ftcasi_hisp>=75 & ftcasi_hisp<=100

gen ftcasi_asian_cat = ftcasi_asian
replace ftcasi_asian_cat= 0 if ftcasi_asian>=0 & ftcasi_asian<25
replace ftcasi_asian_cat= 1 if ftcasi_asian>=25 & ftcasi_asian<50
replace ftcasi_asian_cat= 2 if ftcasi_asian>=50 & ftcasi_asian<75
replace ftcasi_asian_cat= 3 if ftcasi_asian>=75 & ftcasi_asian<=100

//Not a big problem if some have more of a chance in life (432 missing cases)
recode egal_notbigprob (-6=.) (-8=.) (-9=.) (-7=.)(-2=.) (-1=.)
codebook egal_notbigprob 

///We have gone too far to push equal rights (420 missing cases) 
recode egal_toofar (-6=.) (-8=.) (-9=.) (-7=.)(-2=.) (-1=.)
codebook egal_toofar 

//IF people treated fairly there would be fewer problems (423 missing cases) 
recode egal_fewerprobs (-6=.) (-8=.) (-9=.) (-7=.)(-2=.) (-1=.)
codebook egal_fewerprobs 

//Measures of Wealth and Career Stability 

///If you lost your job how easy would it be to find another job? (447 missing cases)
recode cses_diffjob (-6=.) (-8=.) (-9=.) (-7=.)
codebook cses_diffjob 

///Do you or family member have any savings? (447 missing cases)
recode cses_ownsavg (-6=.) (-8=.) (-9=.) (-7=.)
codebook cses_ownsavg

///Do you or member of household own a residence-home or apartment? (419 missing cases) 
recode cses_ownresid (-6=.) (-8=.) (-9=.) (-7=.)
codebook cses_ownresid 

///Do you or member of household own business, property, land or livestock? (419 missing cases) 
recode cses_ownoth (-6=.) (-8=.) (-9=.) (-7=.)
codebook cses_ownoth 

//How likely could income be reduced in next 12 months? (473 missing cases) 
recode cses_increduc (-6=.) (-8=.) (-9=.) (-7=.)
codebook cses_increduc 

//Economic situation of respondent (ECPERIL) (400 + missing variables) 

//During the next year, how likely is it that you will make all your rent/mortage payments on time? (4355 missing cases) 
recode ecperil_payhouse (-6=.) (-8=.) (-1=.) (-7=.)
codebook ecperil_payhouse

///How worried are you about your current financial situation? (421 missing cases) 
recode ecperil_worry (-6=.) (-8=.) (-9=.) (-7=.)
codebook ecperil_worry

//During the next year, how likely is it that you will be able to cover all of your health care costs? (448 missing cases)
recode ecperil_payhlthcst (-6=.) (-8=.) (-9=.) (-7=.)
codebook ecperil_payhlthcst

///Have anyone in your family or a close friend lost job in past year? (431 missing cases) 
recode ecperil_lostjobs (-6=.) (-8=.) (-9=.) (-7=.)
codebook ecperil_lostjobs


///////////////////////////////////////Generate Interactive Variables////////////////////////////

//Construct interactive terms - amount of linked fate and party id or class 

gen southXw_lfamt = south*w_lfamt

gen demXw_lfamt = dem*w_lfamt 

gen repXw_lfamt  = rep*w_lfamt

gen modXw_lfamt = moderate*w_lfamt

gen conXw_lfamt = conservative*w_lfamt

gen libXw_lfamt = liberal*w_lfamt

gen maleXw_lfamt = male*w_lfamt

gen femaleXw_lfamt = female*w_lfamt 

codebook southXw_lfamt demXw_lfamt repXw_lfamt modXw_lfamt conXw_lfamt /*
	*/	libXw_lfamt maleXw_lfamt femaleXw_lfamt 								

				
								

/////////////////////////////OTHER Demographic Variables//////////////////////////////////////

///Race, Ethnicity, & Nation of Origin 
//Dummy Variable Hispanic (0 missing - 18 DK/REF coded as 0) -1005 cases of Hisp

gen cuban = dem_hisptyp_cuban
replace cuban= 0 if dem_hisptyp_cuban!=1
codebook cuban dem_hisptyp_cuban

gen prican = dem_hisptyp_puertorican
replace prican= 0 if dem_hisptyp_puertorican!=1
codebook prican dem_hisptyp_puertorican

gen mex = dem_hisptyp_mex
replace mex= 0 if dem_hisptyp_mex!=1 
codebook mex dem_hisptyp_mex 

gen mexam = dem_hisptyp_mexam
replace mexam= 0 if dem_hisptyp_mexam!=1
codebook mexam dem_hisptyp_mexam 

gen chicano = dem_hisptyp_chicano
replace chicano= 0 if dem_hisptyp_chicano!=1
codebook chicano dem_hisptyp_chicano

gen mex_all = mexam 
replace mex_all=1 if mexam==1| chicano==1| mex==1 
codebook mex_all

gen cuban_all = cuban
replace cuban_all= 1 if cuban== 1 | dem_hisptyp_cubanam==1
codebook cuban cuban_all dem_hisptyp_cubanam

//////Measures of Assimilation for Latinos/////////////////////////////

//Nativity

//Language spoken at home (Ordinal and Dummy)
gen eng_only = dem_hisplang
replace eng_only= 0 if dem_hisplang!=1

gen eng_ord = dem_hisplang
replace eng_ord= 1 if dem_hisplang==5
replace eng_ord= 2 if dem_hisplang==4 
replace eng_ord= 4 if dem_hisplang==2
replace eng_ord= 5 if dem_hisplang==1
replace eng_ord= 0 if dem_hisplang<=0
codebook eng_ord dem_hisplang

//Born in US
gen borninus = dem_nativity
replace borninus= 0 if dem_nativity!=1
codebook borninus dem_nativity

//Native Born Citizen
gen born_citizen = dem_nativity
replace born_citizen= 1 if dem_nativity==1 | dem_nativity==2 |dem_nativity==3
replace born_citizen= 0 if dem_nativity<0 | dem_nativity>=4
codebook born_citizen dem_nativity 

//Age and Age-Squared scaled
gen age_sc = age/90
gen age2_sc = age2/8100
codebook age_sc age2_sc

//How often do you attend church - scaled 
gen churchatt_sc = (church_attoft/4)
codebook churchatt_sc

//White ID and White Linked Fate Scaled 
gen wlf_sc = (w_lfamt/3)
gen whiteid_sc = (whiteid/5)
codebook wlf_sc whiteid_sc

//Registrated prior to the 20012 election (included both registered at current and former address)
gen reg = prevote_regist_addr
replace reg=1 if prevote_regist_addr==2
replace reg=. if prevote_regist_addr<=0
replace reg=0 if prevote_regist_addr==3
codebook reg prevote_regist_addr

///Presidential Vote in 2008 & 2012 
gen prezvote2008_d = interest_voted2008
replace prezvote2008_d= 0 if interest_voted2008==2
codebook prezvote2008_d interest_voted2008

gen prezvote2012_d = prezvote2012
replace prezvote2012_d= 0 if prezvote2012==2
codebook prezvote2012 prezvote2012_d

///Other forms of electoral behavior

///Did you talkt to anyone to try to convince them to vote for a pary or candidate?
gen eb_talk = mobilpo_rmob 
replace eb_talk=0 if mobilpo_rmob ==2
replace eb_talk=. if mobilpo_rmob <=-1
codebook eb_talk mobilpo_rmob 

///Did you go to any political meetings, rallies, speeches, or dinners
//to support a candidate?
gen eb_rally = mobilpo_rally 
replace eb_rally=0 if mobilpo_rally==2
replace eb_rally=. if mobilpo_rally<=-1
codebook eb_rally mobilpo_rally

///Did you wear a campaign button, campaign sticker , or hang a sign
gen eb_sign= mobilpo_sign 
replace eb_sign=0 if mobilpo_sign==2
replace eb_sign=. if mobilpo_sign<=-1
codebook eb_sign mobilpo_sign

//Did you do any work for candidate
gen eb_campaign = mobilpo_otherwork
replace eb_campaign=0 if mobilpo_otherwork==2
replace eb_campaign=. if mobilpo_otherwork<=-1
codebook eb_campaign mobilpo_otherwork

//Did you give money to support an individual candidate for office
gen eb_contrcand = mobilpo_ctbcand
replace eb_contrcand=0 if mobilpo_ctbcand==2
replace eb_contrcand=. if mobilpo_ctbcand<=-1
codebook eb_contrcand mobilpo_ctbcand

//Did you give money to support an individual candidate for office
gen eb_contrpty = mobilpo_ctbpty
replace eb_contrpty=0 if mobilpo_ctbpty==2
replace eb_contrpty=. if mobilpo_ctbpty<=-1
codebook eb_contrpty mobilpo_ctbpty

//Did you give money to any other group that supported or opposed party/candidate
gen eb_contrgroup = mobilpo_ctboth
replace eb_contrgroup=0 if mobilpo_ctboth==2
replace eb_contrgroup=. if mobilpo_ctboth<=-1
codebook eb_contrgroup mobilpo_ctboth

///Contributed Money to EITHER candidate, party, or other group (Coded 1 if contributed to any) 
gen eb_contrmoney = eb_contrcand
replace eb_contrmoney= 1 if eb_contrcand<= 0 & eb_contrpty==1 | eb_contrcand<=0 & eb_contrgroup==1
codebook eb_contrmoney 

///Contributed Money to candidate, party, or other group (SCALE) 
gen eb_contrmoney_sc = (eb_contrcand + eb_contrpty + eb_contrgroup)/(3)
codebook eb_contrmoney_sc

//Have you joined a protest march, rally or dem in past 4 yrs
gen eb_march = dhsinvolv_march
replace eb_march=0 if dhsinvolv_march==2
replace eb_march=. if dhsinvolv_march<=-1
codebook eb_march dhsinvolv_march

///Contacted or attempted to contact a member of US Congress in past 4 yrs
gen eb_contrep = dhsinvolv_contact1
replace eb_contrep=0 if dhsinvolv_contact1==2
replace eb_contrep=. if dhsinvolv_contact1<=-1
codebook eb_contrep dhsinvolv_contact1


///Forms of civic behavior 

//During past 4 years have you served on a board
gen ce_board = dhsinvolv_board
replace ce_board=0 if dhsinvolv_board==2
replace ce_board=. if dhsinvolv_board<=-1
codebook ce_board dhsinvolv_board 

//During past 4 years have you signed a paper petition
gen ce_petition1= dhsinvolv_petition
replace ce_petition1=0 if dhsinvolv_petition==2
replace ce_petition1=. if dhsinvolv_petition<=-1
codebook ce_petition1 dhsinvolv_petition

//During past 4 years have you signed a petition on the net 
gen ce_petition2= dhsinvolv_netpetition
replace ce_petition2=0 if dhsinvolv_netpetition==2
replace ce_petition2=. if dhsinvolv_netpetition<=-1
codebook ce_petition2 dhsinvolv_netpetition

//During past 4 years have you contibuted money to church/religious org  
gen ce_contrrelig = dhsinvolv_relig
replace ce_contrrelig=0 if dhsinvolv_relig==2
replace ce_contrrelig=. if dhsinvolv_relig<=-1
codebook ce_contrrelig dhsinvolv_relig

//During past 4 years have you contibuted money to any org (except church) for 
//social or political issue 

gen ce_controrg = dhsinvolv_org
replace ce_controrg=0 if dhsinvolv_org==2
replace ce_controrg=. if dhsinvolv_org<=-1
codebook ce_controrg dhsinvolv_org

//During past four years have you called tv/radio about political issue 
gen ce_call = dhsinvolv_call
replace ce_call=0 if dhsinvolv_call==2
replace ce_call=. if dhsinvolv_call<=-1
codebook ce_call dhsinvolv_call

//During past four years have you sent a messag on social media on political issue 
gen ce_message = dhsinvolv_message
replace ce_message=0 if dhsinvolv_message==2
replace ce_message=. if dhsinvolv_message<=-1
codebook ce_message dhsinvolv_message

//During past four years have you sent a letter to newspaper/mag on political issue
gen ce_letter = dhsinvolv_letter
replace ce_letter=0 if dhsinvolv_letter==2
replace ce_letter=. if dhsinvolv_letter<=-1
codebook ce_letter dhsinvolv_letter

///Index Variable for Amount of Electoral Participation - aside from voting 
gen eb_index5 = (eb_contrmoney + eb_campaign + eb_rally + eb_talk + eb_sign)/(5)
codebook eb_index5

///Index Variable for Amount of Electoral Participation - aside from voting - included
///two measures that may not be considered electoral participation (writing a letter 
///to representative in Congress and protest)

gen eb_index7 = (eb_contrep + eb_march + eb_contrmoney + eb_campaign + eb_rally /*
	*/ + eb_talk + eb_sign)/(7)

	
///Index Variable for Amount of Civic Participationn - includes measures that I 
//would consider electoral behavior (contrep, protest, and serve on board; also multiple 
///measures might be collapsed - need to reference work by David Repass)
gen ce_index = (ce_letter + ce_message + ce_call + ce_controrg + ce_contrrelig/*
	*/ + ce_board + ce_petition1 + ce_petition2 + eb_march + eb_contrep)/(10)
	

///Generating Variable for Income 1= less than 20 K, 2= 20 - 30 3= 30 - 40 .....9=90-100, 
//10 = 100 - 150, 11= 150  - 250 12==250+
//Same number of categories and matches CMPS - also matches categories of class - except upper class lower threshold is a little low
///Maybe categories should follow class 1 = 30K or less 2= 30 - 60 3= 60 - 100 4)100-150 5= 150+

gen income = incgroup_prepost_x
replace income=1 if incgroup_prepost_x<=10 //Less than 30K - Below the poverty line 
replace income=2 if incgroup_prepost_x>=11 & incgroup_prepost_x<=16 //30 K - 60K (Working Class)
replace income=3 if incgroup_prepost_x>=17 & incgroup_prepost_x<=22 // 60 K - 100 k (Middle Class)
replace income=4 if incgroup_prepost_x>=23 & incgroup_prepost_x<=25 // 100 - 150 K (Upper Middle Class) 
replace income=5 if incgroup_prepost_x>=26  // More than 150 K Upper Class 
replace income=. if incgroup_prepost_x==. 
codebook income 

///Standardize measures for regression to make comparison of effects easier

///Standardizing Variables (one standard deviation in....increases) 
egen male_std = std(male) 
egen income_std = std(income)
egen whiteid_std = std(whiteid)
egen rac_resentment_std = std(rac_tesler) 
egen age_std = std(age)
egen education_std = std(dem_edugroup_x)
egen strpty_std = std(strpty)
egen w_lfamt_std = std(w_lfamt) 
egen resimobi_std = std(resimobi)
egen resmobil_std = std(resmobil)

///Creating Normalized Variables (Range of 0 -1)
egen min_w_lfamt =min(w_lfamt)
egen max_w_lfamt =max(w_lfamt)
gen w_lfamt_norm =(w_lfamt - min_w_lfamt)/(max_w_lfamt- min_w_lfamt)
codebook w_lfamt_norm 
drop min_w_lfamt max_w_lfamt

egen min_whiteid =min(whiteid)
egen max_whiteid =max(whiteid)
gen whiteid_norm =(whiteid - min_whiteid)/(max_whiteid - min_whiteid)
codebook whiteid_norm
drop min_whiteid max_whiteid

egen min_rac_tesler =min(rac_tesler)
egen max_rac_tesler =max(rac_tesler)
gen rac_resentment_norm =(rac_tesler - min_rac_tesler)/(max_rac_tesler- min_rac_tesler)
sum rac_resentment_norm
drop min_rac_tesler max_rac_tesler

egen min_income =min(income)
egen max_income =max(income)
gen income_norm =(income - min_income)/(max_income - min_income)
codebook income_norm
drop min_income max_income

egen min_dem_edugroup_x =min(dem_edugroup_x)
egen max_dem_edugroup_x =max(dem_edugroup_x)
gen education_norm =(dem_edugroup_x - min_dem_edugroup_x)/(max_dem_edugroup_x - min_dem_edugroup_x)
codebook education_norm
drop min_dem_edugroup_x max_dem_edugroup_x


egen min_male =min(male)
egen max_male =max(male)
gen male_norm =(male - min_male)/(max_male - min_male)
codebook male_norm
drop min_male max_male
codebook male male_norm ///matches perfectly as it should 

egen min_age =min(age)
egen max_age =max(age)
gen age_norm =(age - min_age)/(max_age - min_age)
codebook age_norm
sum age_norm
drop min_age max_age

egen min_resimobi =min(resimobi)
egen max_resimobi =max(resimobi)
gen resimobi_norm =(resimobi - min_resimobi)/(max_resimobi - min_resimobi)
codebook resimobi_norm
drop min_resimobi max_resimobi

egen min_strpty =min(strpty)
egen max_strpty =max(strpty)
gen strpty_norm =(strpty - min_strpty)/(max_strpty - min_strpty)
codebook strpty_norm
drop min_strpty max_strpty

drop rac_resentment
gen rac_resentment = rac_tesler

gen education = dem_edugroup_x


///Additional Policies

gen incspend_scitech = fedspend_scitech
recode incspend_scitech (-9=.) (-8=.) (2=-1) (3=0)
codebook incspend_scitech fedspend_scitech

gen incspend_schools= fedspend_schools
recode incspend_schools (-9=.) (-8=.) (2=-1) (3=0)
codebook incspend_schools fedspend_schools 

gen incspend_welfare = fedspend_welfare
recode incspend_welfare (-9=.) (-8=.) (2=-1) (3=0)
codebook incspend_welfare fedspend_welfare

gen incspend_child = fedspend_child
recode incspend_child (-9=.) (-8=.) (2=-1) (3=0)
codebook incspend_child fedspend_child 

gen incspend_poor = fedspend_poor 
recode incspend_poor (-9=.) (-8=.) (2=-1) (3=0)
codebook incspend_poor fedspend_poor 

gen incspend_crime = fedspend_crime  
recode incspend_crime (-9=.) (-8=.) (2=-1) (3=0)
codebook incspend_crime fedspend_crime 

recode budget_deficit_x (-9=.) (-8=.) (-7=.) (-6=.) (-1=.)
codebook budget_deficit_x

recode immigpo_level (-9=.) (-8=.) (-7=.) (-6=.)
codebook immigpo_level

codebook immigpo_jobs
recode immigpo_jobs (-9=.) (-8=.) (-7=.) (-6=.)
codebook immigpo_jobs

codebook cses_expunemp
recode cses_expunemp (-9=.) (-8=.) (-7=.) (-6=.)
codebook cses_expunemp

codebook cses_expdef
recode cses_expdef (-9=.) (-8=.) (-7=.) (-6=.)
codebook cses_expdef

codebook cses_expss
recode cses_expss (-9=.) (-8=.) (-7=.) (-6=.)
codebook cses_expss

codebook cses_exppolc
recode cses_exppolc (-9=.) (-8=.) (-7=.) (-6=.)
codebook cses_exppolc

codebook cses_expwelf
recode cses_expwelf (-9=.) (-8=.) (-7=.) (-6=.)
codebook cses_expwelf

codebook penalty_favopp_x
recode penalty_favopp_x (-9=.) (-8=.) (-7=.) (-6=.)
codebook penalty_favopp_x

codebook aapost_hire_x
recode aapost_hire_x (-9=.) (-8=.) (-7=.) (-6=.) (-1=.)
codebook aapost_hire_x

codebook outsource_enc_x
recode outsource_enc_x (-9=.) (-8=.) (-7=.) (-6=.)
codebook outsource_enc_x

codebook imports_limit 
recode imports_limit (-9=.) (-8=.) (-7=.) (-6=.) (-2=.) (2=0)
codebook imports_limit

codebook fairjob_opin_x
recode fairjob_opin_x (-9=.) (-8=.) (-7=.) (-6=.) (-1=.) 
codebook fairjob_opin_x

recode ftpo_pres (-9=.) (-8=.) (-7=.) (-6=.)

recode ftpo_rpc (-9=.) (-8=.) (-7=.) (-6=.) (-2=.) 


/* Sources of Media intake for news on the presidential election
Medsrc – source of media for following politics 
medsrc_tvprog_22 - fox report
medsrc_tvprog_15 - john stewart daily show 
medsrc_tvprog_14 - colbert report 
medsrc_tvprog_25 - shawn hannity
medsrc_tvprog_25 - huckabee 
medsrc_tvprog_36 - O'Reily Factor
medsrc_radio_01 randordq_medsrc_radio_04 randordq_medsrc_radio_14  randordq_medsrc_radio_08- NPR
medsrc_radio_05 - Glen Beck
medsrc_radio_11 - Rush Limbagh 
medsrc_radio_13 - Shawn Hannity 
medsrc_websites_03 - Drudge Report 
medsrc_websites_06 - Fox News
medsrc_websites_08 - Huff Post */


//How serious is gender discrimination modsex_discamt
///For study on Women (MODSEXISM and WOMEN Questions)(PTYWOM)- which party is better for women



						/* ORDERING & ORGANIZING ALL OF THE KEY VARIABLES CREATED OR RECODED */

								/* NATION OF ORIGIN IMMIGRATION & ASSIMILATION */
order cuban prican mex mexam chicano mex_all cuban_all eng_only eng_ord borninus born_citizen 


								/* LINKED FATE - RACIAL MINORITIES */
order b_lf b_lfamt h_lf h_lfamt wom_lf wom_lfamt oth_lf oth_lfamt 		


								/* SOURCES OF MEDIA - RADIO, TV, AND WEBSITES */	
order medsrc_tvprog_22 medsrc_tvprog_15 medsrc_tvprog_14 medsrc_tvprog_25 medsrc_tvprog_36 /*
	*/ medsrc_radio_01 medsrc_radio_05 medsrc_radio_11 medsrc_radio_13 /*
	*/ medsrc_websites_03 medsrc_websites_06 medsrc_websites_08 							


								/* LEVEL OF FINANCIAL SECURITY */
order cses_diffjob cses_ownsavg cses_ownresid cses_ownoth cses_increduc ecperil_payhouse /*
	*/ ecperil_worry ecperil_payhlthcst ecperil_lostjobs	
	
								/*FEELING THERMOMETER TOWARD PARTIES & CANDIDATES*/
order ft_hclinton ft_rpc ft_dem ft_rep cong_app

								/* PUBLIC POLICY ATTITUDES */
order choice gun_morediff  

								/* TRUST, ROLE, AND SIZE OF GOVERNMENT */
order fedspend_poor_d fedspend_poor_d trust_fedgov trust_bigint trustgov_waste trustgov_corrpt /*
	*/ patriot_flag patriot_love govrole_big govrole_market govrole_lessmore govrole_index
	
						/* PERSONAL AND NAITONAL ATTITUDES TOWARD STATE OF ECONOMY*/	
order finance_finpast_x ineq_incgap_x econ_ecnow /*
	*/econ_ecpast_x econ_unpast_x econ_unnext cses_govtact cses_econ cses_impstdliv		
			
									///INteractive Variables/////
order southXw_lfamt demXw_lfamt repXw_lfamt modXw_lfamt conXw_lfamt /*
	*/	libXw_lfamt maleXw_lfamt femaleXw_lfamt 			
			
				/* INDEX VARIABLES - MORAL TRADITIONALISM, RACIAL RESENTMENT, AUTHORITARIANISM, Egalitarianism */
order  moral_trad author rac_resentment rac_resent resent_1 resent_2 resent_3 resent_4 egal_notbigprob egal_toofar egal_fewerprobs

						/* POLITICAL ATTITUDES TOWARD OBAMA ADMINISTRATION*/
order obama_muslim obama_bornus obama_bia pres_app pres_econ pres_hlth ft_dpc		
					
								
								/*ATTITUDES TOWARD RACIALIZED POLICIES */
order fedspend_welfare_d fedspend_crime_d aidblack_self aa_work_x cses_exppolc cses_expwelf /*
	*/ immig_policy immig_sendback immig_dreamact support_immigchecks health_2010hcr_x	
									
						
										/*ATTITUDED TOWARD WHITES*/
order white_affect stype_white racecasi_infwhite stype_hwkwhite stype_intwhite discrim_whites discrim_self ftcasi_white

								/* ATTITUDES TOWARD RACIAL MINORITIES */
order black_affect stype_black stype_hisp stype_asian racecasi_infhisp  racecasi_sympblacks racecasi_admblacks /*
	*/  ftcasi_black ftcasi_hisp ftcasi_asian ftcasi_illeg 		
	

						/* WEALTH, CLASS, OCCUPATION, AND PERSONAL/NATIONAL ECONOMIC */
order wrkcl midcl middleclass workingclass repclasswork repclassmid wealth_stock_d ownhome dem_empstatus_1digitfin_x  /* 
	*/homemaker retired unemp govemp dem_losejob incgroup_median incgroup_onepercent incgroup_poverty incgroup_middle 

										/* GEOGRAPHIC VARIABLES */ 
order sample_stfips sample_region mtnwest pacwest 
		
									/* Political Behavior */
order interest_attention rvote2008_x rvote2012_x prevote_primv vote_obama08_ifvote /*
	*/ vote_obama08_ifvote_nomis vote_obama08_d vote_obama12_ifvote /*
	*/ vote_obama12_ifvote_nomis vote_obama12_d mob attend_polevent	

									/* POLITICAL VARIABLES */ 
order party pid_x party_5 ideo_7 ideo_5 ideo_3 liberal conservative moderate dem rep indep teasup teaparty mob attend_polevent rvote2012_x prevote_primv prezvote2008 prezvote2012/*
	*/ interest_attention 

		
								/*RELIGIOUS IDENTITY & BEHAVIOR*/
order ident_religid church_att church_attoft relig_7cat_x protestant catholic christian evan jewish notrelig 


									/*DEMOGRAPHIC VARIABLES*/
order female male dem_raceeth hisp white black asian married dem_edugroup_x degree incgroup_prepost_x incgroup_cat /*
	*/age age_c vet union 

	
									/*OUTCOME VARIABLES*/
order w_lf w_lfamt whiteid rac_resentment 




gen latino=0
replace latino=1 if dem_hisp==1

tab white

tab black


tab black_discrim

tab white_discrim

tab latino_discrim

gen whitepos=.
gen blackpos=.
gen latinopos=.
gen asampos=.

**hmmm***
replace whitepos=0 if white==1
replace whitepos=(whitepos+1) if white_discrim>black_discrim
replace whitepos=(whitepos+1) if white_discrim>latino_discrim
replace whitepos=(whitepos-1) if white_discrim<black_discrim
replace whitepos=(whitepos-1) if white_discrim<latino_discrim
replace whitepos=whitepos+2
tab whitepos


replace blackpos=0 if black==1
replace blackpos=(blackpos+1) if black_discrim>white_discrim
replace blackpos=(blackpos+1) if black_discrim>latino_discrim
replace blackpos=(blackpos-1) if black_discrim<white_discrim
replace blackpos=(blackpos-1) if black_discrim<latino_discrim
tab blackpos
replace blackpos=blackpos+2


replace latinopos=0 if latino==1
replace latinopos=(latinopos+1) if latino_discrim>white_discrim
replace latinopos=(latinopos+1) if latino_discrim>black_discrim
replace latinopos=(latinopos-1) if latino_discrim<white_discrim
replace latinopos=(latinopos-1) if latino_discrim<black_discrim
tab latinopos
replace latinopos=latinopos+2



label define positionalitylabel -2 "The Least" 0 "Same As All Groups" 2 "The Most"


gen positionality=.
replace positionality=blackpos if black==1
replace positionality=latinopos if latino==1
replace positionality=whitepos if white==1
label values positionality positionalitylabel

	gen romneyvote=0
gen obamavote=0

tab presvote2012_x

replace obamavote=1 if presvote2012_x==1
replace romneyvote=1 if presvote2012_x==2

rename ideo_7 ideology
rename pid_x partyid

set more off
tab positionality

rename rac_resentment_norm rr

rename prezvote2012_d voted

gen contacted=.
replace contacted=0 if cses_contct==2
replace contacted=1 if cses_contct==1

gen reldep = whitepos/4

gen interaction= whitepos*positionality

tab efficpo_complicstd
tab efficpo_undstd
tab efficpo_carestd
tab efficpo_saystd
tab efficpo_complicrev
tab efficpo_undrev
tab efficpo_carerev
tab efficpo_sayrev
tab efficpo_bothside

gen efficacypost = 0
replace efficacypost = efficacypost + 1 if efficpo_complicstd==1
replace efficacypost = efficacypost + 2 if efficpo_complicstd==2
replace efficacypost = efficacypost + 3 if efficpo_complicstd==3
replace efficacypost = efficacypost + 4 if efficpo_complicstd==4
replace efficacypost = efficacypost + 5 if efficpo_complicstd==5
replace efficacypost = efficacypost + 1 if efficpo_undstd==1
replace efficacypost = efficacypost + 2 if efficpo_undstd==2
replace efficacypost = efficacypost + 3 if efficpo_undstd==3
replace efficacypost = efficacypost + 4 if efficpo_undstd==4
replace efficacypost = efficacypost + 5 if efficpo_undstd==5
 replace efficacypost = efficacypost + 1 if efficpo_carestd==1
replace efficacypost = efficacypost + 2 if efficpo_carestd==2
replace efficacypost = efficacypost + 3 if efficpo_carestd==3
replace efficacypost = efficacypost + 4 if efficpo_carestd==4
replace efficacypost = efficacypost + 5 if efficpo_carestd==5
 replace efficacypost = efficacypost + 1 if efficpo_saystd==1
replace efficacypost = efficacypost + 2 if efficpo_saystd==2
replace efficacypost = efficacypost + 3 if efficpo_saystd==3
replace efficacypost = efficacypost + 4 if efficpo_saystd==4
replace efficacypost = efficacypost + 5 if efficpo_saystd==5
 replace efficacypost = efficacypost + 1 if efficpo_complicrev==1
replace efficacypost = efficacypost + 2 if efficpo_complicrev==2
replace efficacypost = efficacypost + 3 if efficpo_complicrev==3
replace efficacypost = efficacypost + 4 if efficpo_complicrev==4
replace efficacypost = efficacypost + 5 if efficpo_complicrev==5
 replace efficacypost = efficacypost + 1 if efficpo_undrev==5
replace efficacypost = efficacypost + 2 if efficpo_undrev==4
replace efficacypost = efficacypost + 3 if efficpo_undrev==3
replace efficacypost = efficacypost + 4 if efficpo_undrev==2
replace efficacypost = efficacypost + 5 if efficpo_undrev==1
 replace efficacypost = efficacypost + 1 if efficpo_carerev==5
replace efficacypost = efficacypost + 2 if efficpo_carerev==4
replace efficacypost = efficacypost + 3 if efficpo_carerev==3
replace efficacypost = efficacypost + 4 if efficpo_carerev==2
replace efficacypost = efficacypost + 5 if efficpo_carerev==1
 replace efficacypost = efficacypost + 1 if efficpo_sayrev==5
replace efficacypost = efficacypost + 2 if efficpo_sayrev==4
replace efficacypost = efficacypost + 3 if efficpo_sayrev==3
replace efficacypost = efficacypost + 4 if efficpo_sayrev==2
replace efficacypost = efficacypost + 5 if efficpo_sayrev==1
 replace efficacypost = efficacypost + 1 if efficpo_bothside==5
replace efficacypost = efficacypost + 2 if efficpo_bothside==4
replace efficacypost = efficacypost + 3 if efficpo_bothside==3
replace efficacypost = efficacypost + 4 if efficpo_bothside==2
replace efficacypost = efficacypost + 5 if efficpo_bothside==1

replace efficacypost = efficacypost/45


gen piddummies = .
replace piddummies = 1 if dem==1
replace piddummies = 2 if rep==1

gen resprace = .
replace resprace = 1 if dem_raceeth_x==1
replace resprace = 2 if dem_raceeth_x==2
replace resprace = 3 if dem_raceeth_x==5





save "ANES 2012Rec.dta", replace /// REPLACE WITH PATH TO RECODED 2012 ANES


************************************************************************************************************
* 2016 * 2016 * 2016 * 2016 * 2016 * 2016 * 2016 * 2016 * 2016 * 2016 * 2016 * 2016 * 2016 * 2016 * 2016 * 2016 
************************************************************************************************************



clear
set more off

use "anes_timeseries_2016" /// REPLACE WITH PATH TO RAW 2016 ANES



rename *, lower 

codebook v161003
gen pay_attn= v161003
label variable pay_attn "How often does R pay attn to politics (pre)"
replace pay_attn=1 if v161003==5
replace pay_attn=2 if v161003==4
replace pay_attn=3 if v161003==3
replace pay_attn=4 if v161003==2
replace pay_attn=5 if v161004==1
label define vallab1 1 "Never" 2 "Some of the Time" 3 "About half the time" 4 "Most of the time" 5 "Always"
label values pay_attn vallab1
codebook pay_att

codebook v161004
gen follow_campaign=v161004
label variable follow_campaign "Interest in following campaign (pre)"
replace follow_campaign=1 if v161004==3
replace follow_campaign=3 if v161004==1
label define vallab2 1 "Not much interested" 2 "Somewhat interested" 3 "Very much interested"
label values follow_campaign vallab2
codebook follow_campaign

codebook v161005
gen voted_2012=v161005
label variable voted_2012 "Did R vote for pres in 2012"
replace voted_2012=0 if v161005==2
replace voted_2012=. if v161005== -9 | v161005== -8
label define vallab3 0 "Did not vote" 1 "Voted in 2012" 
label values voted_2012 vallab3
codebook voted_2012

///I did not include the don't know/refused within the did not vote category here- I can alter if it's better to do so///


codebook v161006
gen vote_romney=v161006
label variable vote_romney "Voted Romney dummy"
replace vote_romney=1 if v161006==2
replace vote_romney=0 if v161006==1 | v161006==5
replace vote_romney=. if v161006== -9| v161006== -8 | v161006== -1 | v161006==6
label define vallab4 0 "Voted Obama/other" 1 "Voted Romney" 
label values vote_romney vallab4
codebook vote_romney

gen vote_obama=v161006
replace vote_obama=0 if v161006==2 |v161006==5
replace vote_obama=. if v161006== -9| v161006== -8 | v161006== -1 | v161006==6
label define vallab5 0 "Voted Romney/other" 1 "Voted Obama"
label values vote_obama vallab5
codebook vote_obama 


codebook v161011
gen reg_vote= v161011
label variable reg_vote "Registered to vote (pre)"
replace reg_vote=1 if v161011==1 | v161011==2
replace reg_vote=0 if v161011==3
replace reg_vote=. if v161011== -8 | v161011== -9
label define vallab6 0 "Not currently registered" 1 "Registered"
label values reg_vote vallab6
codebook reg_vote



codebook v161019
gen party_reg=v161019
label variable party_reg "Party of registration (pre)"
replace party_reg=3 if v161019==4 | v161019==5
replace party_reg=. if v161019== -1 | v161019== -8 | v161019== -9
label define vallab7 1 "Democrat" 2 "Republican" 3 "Independent/None/Other"
label values party_reg vallab7
codebook party_reg

///I'm not sure why so many respondents are categorized as -1, which is unlabeled///

gen reg_dem=v161019
label variable reg_dem "Registered Democrat"
replace reg_dem=0 if v161019==2 | v161019==4 | v161019==5
replace reg_dem=. if v161019== -1 | v161019== -8 | v161019== -9
label define vallab8 0 "Other/None" 1 "Registered Democrat"
label values reg_dem vallab8
codebook reg_dem

gen reg_repub=v161019
label variable reg_repub "Registered Republican"
replace reg_repub=1 if v161019==2
replace reg_repub=0 if v161019==1 | v161019==4 | v161019==5
replace reg_repub=. if v161019== -1 | v161019== -8 | v161019== -9
label define vallab9 0 "Other/None" 1 "Registered Republican"
label values reg_repub vallab9
codebook reg_repub


codebook v161020
gen reg_intent=v161020
label variable reg_intent "Does R intend to register to vote (pre)"
replace reg_intent=0 if v161020==2
replace reg_intent=. if v161020== -1 | v161020== -8
label define vallab10 0 "Doesn't intend to register" 1 "Intends to register"
label values reg_intent vallab10
codebook reg_intent

codebook v162332
gen usid=.
replace usid=1 if v162332==5
replace usid=2 if v162332==4
replace usid=3 if v162332==3
replace usid=4 if v162332==2
replace usid=5 if v162332==1



codebook v161021
gen vote_primary=v161021
label variable vote_primary "Did R vote in a pres primary/caucus (pre)"
replace vote_primary=0 if v161021==2
replace vote_primary=. if v161021== -8 | v161021== -9
label define vallab11 0 "Didn't vote in a primary/caucus" 1 "Voted in a primary/caucus"
label values vote_primary vallab11
codebook vote_primary


codebook v161021a
gen primary_vote=v161021a
label variable primary_vote "Which candidate did R vote for in primary (pre)"
replace primary_vote=. if v161021a== -1 | v161021a== -8 | v161021a== -9
label define vallab12 1 "Hillary Clinton" 2 "Bernie Sanders" 3 "Another Democrat" 4 "Donald Trump" 5 "Ted Cruz" 6 "John Kasich" 7 "Marco Rubio" 8 "Another Republican" 9 "Someone that isn't a Repub or a Dem"
label values primary_vote vallab12
codebook primary_vote 
           

codebook v161022
gen already_voted=v161022
label variable already_voted "Already voted in the general election (pre)"
replace already_voted=0 if v161022==2
replace already_voted=. if v161022== -1 | v161022== -9
label define vallab13 0 "Have not voted" 1 "Have voted" 
label values already_voted vallab13
codebook already_voted



codebook v161026
gen voted_pre=v161026
label variable voted_pre "Did R vote for president in 2016"
replace voted_pre=0 if v161026 !=1
label define vallab14 0 "Didn't vote for pres/haven't voted yet/inap" 1 "Yes, voted for President"
label values voted_pre vallab14
codebook voted_pre




codebook v161027
gen votechoice_pre=v161027
label variable votechoice_pre "For whom did R vote for Pres (pre)"
replace votechoice_pre=. if v161027== -1 | v161027== -9
label define vallab15 1 "Hillary Clinton" 2 "Donald Trump" 3 "Gary Johnson" 4 "Jill Stein" 5 "Other Candidate"
label values votechoice_pre vallab15
codebook votechoice_pre


codebook v161028
gen pref_strength=v161028
label variable pref_strength "Preference strong for pres cand for whom R voted (pre)"
replace pref_strength=0 if v161028==2
replace pref_strength=. if v161028== -1
label define vallab16 0 "Not strong" 1 "Strong"
label values pref_strength vallab16
codebook pref_strength


codebook v161030
gen intend_vote= v161030
label variable intend_vote "Does R intend to vote for President (pre)"
replace intend_vote=0 if v161030==2
replace intend_vote=. if v161030== -1 | v161030== -8 | v161030== -9
label define vallab17 0 "No" 1 "Yes" 
label values intend_vote vallab17
codebook intend_vote



codebook v161031
tabulate v161031
gen vote_intent=v161031
label variable vote_intent "For whom does R intend to vote (pre)"
replace vote_intent=. if v161031== -9 |v161031==-8 | v161031==6 | v161031==7 | v161031==8
label define vallab18 1 "Hillary Clinton" 2 "Donald Trump" 3 "Gary Johnson" 4 "Jill Stein" 5 "Other candidate"
label values vote_intent vallab18
codebook vote_intent


codebook v161064x
tabulate v161064x
///not sure how to code this one. It includes every possible permutation of vote/intent/preferance////


codebook v161065x
codebook v161067x
///I'm also unsure about coding these two////

codebook v161080x
gen approve_congress=v161080x
label variable approve_congress "Approval/disapproval of Congress handling job (pre)"
replace approve_congress=4 if v161080x==1
replace approve_congress=3 if v161080x==2
replace approve_congress=2 if v161080x==3
replace approve_congress=1 if v161080x==4
replace approve_congress=. if v161080x==-1
label define vallab19 1 "Disapprove strongly" 2 "Disapprove not strongly" 3 "Approve not strongly" 4 "Approve strongly"
label values approve_congress vallab19
codebook approve_congress

////Just to be clear, I copied those value labels ("approve not strongly") straight from the original variable//



codebook v161081
gen right_track=v161081
label variable right_track "Are things in this country on the right track (pre)"
replace right_track=0 if v161081==2
replace right_track=. if v161081==-8 | v161081== -9
label define vallab20 0 "Wrong track" 1 "Right track"
label values right_track vallab20
codebook right_track

gen wrong_track=v161081
label variable wrong_track "Are things in this country on the right track (pre)"
replace wrong_track=1 if v161081==2
replace wrong_track=0 if v161081==1
replace wrong_track=. if v161081==-8 | v161081== -9
label define vallab21 0 "Right track" 1 "Wrong track"
label values wrong_track vallab21
codebook wrong_track



codebook v161082x
gen pres_approve=v161082x
label variable pres_approve "(dis)approval of president handling job (pre)"
replace pres_approve=1 if v161082x==4
replace pres_approve=2 if v161082x==3
replace pres_approve=3 if v161082x==2
replace pres_approve=4 if v161082x==1
replace pres_approve=. if v161082x==-1
label define vallab22 1 "Disapprove strongly" 2 "Disapprove not strongly" 3 "Approve not strongly" 4 "Approve strongly"
label values pres_approve vallab22
codebook pres_approve



codebook v161083x
gen pres_econ=v161083x
label variable pres_econ "Approval of president handling economy (pre)"
replace pres_econ=1 if v161083x==4
replace pres_econ=2 if v161083x==3
replace pres_econ=3 if v161083x==2
replace pres_econ=4 if v161083x==1
replace pres_econ=. if v161083x==-1
label define vallab23 1 "Disapprove strongly" 2 "Disapprove not strongly" 3 "Approve not strongly" 4 "Approve strongly"
label values pres_econ vallab23
codebook pres_econ


codebook v161085x
gen pres_hcare=v161085x
label variable pres_hcare "Approval of pres handling health care (pre)"
replace pres_hcare=1 if v161085x==4
replace pres_hcare=2 if v161085x==3
replace pres_hcare=3 if v161085x==2
replace pres_hcare=4 if v161085x==1
replace pres_hcare=. if v161085x==-1
label values pres_hcare vallab23
codebook pres_hcare



codebook v161086
tabulate v161086
gen dpres_ftherm=v161086
label variable dpres_ftherm "Feeling thermometer: Democratic Presidential Candidate"
replace dpres_ftherm=. if v161086==-88 | v161086==-88 | v161086==998
codebook dpres_ftherm



codebook v161087
tabulate v161087
gen rpres_ftherm=v161087
label variable rpres_ftherm "Feeling therm: Repub Presidential Candidate"
replace rpres_ftherm=. if v161087==-88| v161087==-99 | v161087==998
codebook rpres_ftherm


codebook v161088
tabulate v161088
gen lpres_ftherm=v161088
label variable lpres_ftherm "Feeling therm: Libertarian Presidential Candidate"
replace lpres_ftherm=. if v161088==-99 | v161088==-88 | v161088==-89 | v161088==998
codebook lpres_ftherm


codebook v161089
tabulate v161089
gen gpres_ftherm=v161089
label variable gpres_ftherm "Feeling therm: Green Party Presidential Candidate"
replace gpres_ftherm=. if v161089==-99 | v161089==-88 | v161089==-89
codebook gpres_ftherm
 


codebook v161090
gen dvp_ftherm=v161090
label variable dvp_ftherm "Feeling therm: Democratic VP candidate"
replace dvp_ftherm=. if v161090==-99 | v161090==-88| v161090==-89
codebook dvp_ftherm

codebook v161091
gen rvp_ftherm=v161091
replace rvp_ftherm=. if v161091==-99 | v161091==-88 | v161091==-89
codebook rvp_ftherm

codebook v161092
gen obama_ftherm=v161092
replace obama_ftherm=. if v161092==-99 | v161092==-88 | v161092==-89
codebook obama_ftherm


codebook v161093
gen bclinton_ftherm=v161093
replace bclinton_ftherm=. if v161093==-99 | v161093==-89 | v161093==-88
codebook bclinton_ftherm


codebook v161095
gen dparty_ftherm=v161095
replace dparty_ftherm=. if v161095==-99 | v161095==-89 | v161095==-88
codebook dparty_ftherm

codebook v161096
gen rparty_ftherm=v161096
replace rparty_ftherm=. if v161096==-99 | v161096==-89 | v161096==-88
codebook rparty_ftherm



codebook v161110
gen better_off=v161110
label variable better_off "R better/worse off than 1 yr ago (pre)"
replace better_off=1 if v161110==5
replace better_off=2 if v161110==4
replace better_off=4 if v161110==2
replace better_off=5 if v161110==1
replace better_off=. if v161110==-9 | v161110==-8
label define vallab24 1 "Much worse off" 2 "Somewhat worse off" 3 "About the same" 4 "Somewhat better off" 5 "Much better off"
label values better_off vallab24
codebook better_off



codebook v161111
gen nxt_yr= v161111
label variable nxt_yr "How much better off R expects to be nxt year (pre)"
replace nxt_yr=1 if v161111==5
replace nxt_yr=2 if v161111==4
replace nxt_yr=4 if v161111==2
replace nxt_yr=5 if v161111==1
replace nxt_yr=. if v161111==-9 | v161111==-8
label values nxt_yr vallab24
codebook nxt_yr



codebook v161112
gen health_ins= v161112
label variable health_ins "Does R have health insurance"
replace health_ins=0 if v161112==2
replace health_ins=. if v161112==-8 | v161112==-9
label define vallab24b 0 "No" 1 "Yes"
label values health_ins vallab24b
codebook health_ins

codebook v161114x
gen aca_favor=v161114x
label variable aca_favor "Favor/oppose 2010 health care law"
replace aca_favor=1 if v161114x==7
replace aca_favor=2 if v161114x==6
replace aca_favor=3 if v161114x==5
replace aca_favor=5 if v161114x==3
replace aca_favor=6 if v161114x==2
replace aca_favor=7 if v161114x==1
replace aca_favor=. if v161114x==-1
label define vallab24c 1 "Oppose a great deal" 2 "Oppose moderately" 3 "Oppose a little" 4 "Neither favor nor oppose" 5 "Favor a little" 6 "Favor moderately" 7 "Favor a great deal"
label values aca_favor vallab24c
codebook aca_favor



codebook v161116
gen clinton_anger= v161116
label variable clinton_anger "Affect for Dem Pres cand: angry"
replace clinton_anger=. if v161116==-8 | v161116==-9
label define vallab25 1 "Never" 2 "Some of the time" 3 "About half the time" 4 "Most of the time" 5 "Always"
label values clinton_anger vallab25
codebook clinton_anger

codebook v161117
gen clinton_hopeful=v161117
label variable clinton_hopeful "Affect for Dem Pres cand: hopeful"
replace clinton_hopeful=. if v161117==-8 | v161117==-9
label values clinton_hopeful vallab25
codebook clinton_hopeful


codebook v161118
gen clinton_afraid=v161118
label variable clinton_afraid "Affect for Dem Pres cand: afraid"
replace clinton_afraid=. if v161118==-8| v161118==-9
label values clinton_afraid vallab25
codebook clinton_afraid

codebook v161119
gen clinton_proud=v161119
label variable clinton_proud "Affect for Dem Pres cand: proud"
replace clinton_proud=. if v161119==-8 | v161119==-9
label values clinton_proud vallab25
codebook clinton_proud



codebook v161120
gen clinton_disgust= v161120
label variable clinton_disgust "Affect for dem pres cand: disgusted (pre)"
replace clinton_disgust=. if v161120==-9 | v161120==-8
label values clinton_disgust vallab25
codebook clinton_disgust


codebook v161121
gen trump_angry= v161121
label variable trump_angry "Affect for Republican pres cand: angry (pre)"
replace trump_angry=. if v161121==-8 | v161121==-9
label values trump_angry vallab25
codebook trump_angry


codebook v161122
gen trump_hopeful=v161122
label variable trump_hopeful "Affect for Repub pres cand: hopeful (pre)"
replace trump_hopeful=. if v161122==-9 | v161122==-8
label values trump_hopeful vallab25
codebook trump_hopeful


codebook v161123
gen trump_afraid= v161123
label variable trump_afraid "Affect for repub cand: afraid (pre)"
replace trump_afraid=. if v161123==-9 | v161123==-8
label values trump_afraid vallab25
codebook trump_afraid


codebook v161124
gen trump_proud = v161124
label variable trump_proud "Affect for repub cand: proud (pre)"
replace trump_proud= . if v161124==-8 | v161124==-9
label values trump_proud vallab25
codebook trump_proud



codebook v161125
gen trump_disgust=v161125
label variable trump_disgust "Affect for repub cand: disgusted (pre)"
replace trump_disgust=. if v161125==-8 | v161125==-9
label values trump_disgust vallab25
codebook trump_proud

codebook v161126
tabulate v161126
gen ideo_7 =v161126
replace ideo_7=. if v161126==-9 | v161126==-8 | v161126==99
label define vallab26 1 "Extremely liberal" 2 "Liberal" 3 "Slightly liberal" 4 "Moderate, middle of the road" 5 "Slightly conservative" 6 "Conservative" 7 "Extremely conservative"
label values ideo_7 vallab26
codebook ideo_7


codebook v161127
gen ideo_3= v161127
replace ideo_3=. if v161127==-1 | v161127==-8 | v161127==-9
label define vallab27 1 "Liberal" 2 "Conservative" 3 "Moderate"
label values ideo_3 vallab27
codebook ideo_3

///the 3 pt scale variable only includes people in the  moderate and "haven't thought about this much" categories in v161126 (7 pt question)"



codebook v161138x
gen income_gap= v161138x
label variable income_gap "Do you think the income gap is larger/smaller than it was 20 yrs ago (pre)"
replace income_gap=1 if v161138x==5
replace income_gap=2 if v161138x==4
replace income_gap=4 if v161138x==2
replace income_gap=5 if v161138x==1
replace income_gap=. if v161138x==-1
label define vallab28 1 "Much smaller" 2 "Somewhat smaller" 3 "About the same" 4 "Somewhat larger" 5 "Much larger"
label values income_gap vallab28
codebook income_gap


codebook v161140x
gen econ_selfpercep= v161140x
label variable econ_selfperce "Economy better/worse than a year ago (pre)"
replace econ_selfpercep=1 if  v161140x==5
replace econ_selfpercep=2 if  v161140x==4
replace econ_selfpercep=4 if  v161140x==2
replace econ_selfpercep=5 if  v161140x==1
replace econ_selfpercep=. if  v161140x==-1
label define vallab29 1 "Much worse" 2 "Somewhat worse" 3 "About the same" 4 "Somewhat better" 5 "Much better"
label values econ_selfpercep vallab29
codebook econ_selfpercep


codebook v161141x
gen econ_outlook =v161141x
label variable econ_outlook "Economy will be better/worse in a year (pre)"
replace econ_outlook=1 if v161141x==5
replace econ_outlook=2 if v161141x==4
replace econ_outlook=4 if v161141x==2 
replace econ_outlook=5 if v161141x==1
replace econ_outlook=. if v161141x==-1
label values econ_outlook vallab29
codebook econ_selfpercep


codebook v161142x
gen employ_percep =v161142x
replace employ_percep=1 if v161142x==5
replace employ_percep=2 if v161142x==4
replace employ_percep=4 if v161142x==2
replace employ_percep=5 if v161142x==1
replace employ_percep=. if v161142x==-1
label values employ_percep vallab29
codebook employ_percep



codebook v161143
gen employ_outlook=v161143
label variable employ_outlook "More/less employment in a yr (pre)"
replace employ_outlook=1 if v161143==3
replace employ_outlook=3 if v161143==1
replace employ_outlook=. if v161143==-8 | v161143==-9
label define vallab30 1 "Less" 2 "About the same" 3 "More"
label values employ_outlook vallab30
codebook employ_outlook


codebook v161144
gen econ_mgmt= v161144
label variable econ_mgmt "Which party better at handling nation's economy (pre)"
replace econ_mgmt=2 if v161144==3
replace econ_mgmt=3 if v161144==2
replace econ_mgmt=. if v161144==4 | v161144==-8 | v161144==-9
label define vallab31 1 "Democrats" 2 "Not much difference between them" 3 "Republicans"
label values econ_mgmt vallab31
codebook econ_mgmt

///I dropped the 10 respondents that said neither party, they could potentially go in the middle cat though////

///I'm going to make dummy variables for dem/repub preferences///


gen econ_dems=v161144
label variable econ_dems "R thinks dems are better at handling economy (pre)"
replace econ_dems= 0 if v161144==2| v161144==3| v161144==4
replace econ_dems=. if v161144==-8 | v161144==-9
label define vallab32 0 "Other" 1 "Dems"
label values econ_dems vallab32
codebook econ_dems


gen econ_repubs=v161144
label variable econ_repubs "R thinks repubs are better at handling economy (pre)"
replace econ_repubs= 0 if v161144==1| v161144==3| v161144==4
replace econ_repubs=. if v161144==-8 | v161144==-9
replace econ_repubs=1 if v161144==2
label define vallab33 0 "Other" 1 "Repubs"
label values econ_repubs vallab33
codebook econ_repubs





codebook v161158x
gen party_id=v161158x
replace party_id=. if v161158x==-8 | v161158x==-9
label define vallab34 1 "Strong democrat" 2 "Not very strong dem" 3 "Independent-dem" 4 "Independent" 5 "Independent- repub" 6 "Not very strong repub" 7 "Strong republican"
label values party_id vallab34
codebook party_id



codebook v161192
gen undoc_policy=v161192
label variable undoc_policy "US gov policy towards unauthorized immigrants (pre)"
replace undoc_policy=. if v161192==-9 | v161192==-8
label define vallab35 1 "Make all unauth immigrants felons and send them back to home country" 2 "Have a guest worker program in order to work" 3 "Allow to remain and eventually qualify for citizenship if they meet requirements like paying back taxes and fines, learning English, and passing background checks" 4 "Allow unauth imms to remain in the US and eventually qualify for citizenship, without penalties"
label values undoc_policy vallab35
codebook undoc_policy


codebook v161194x
gen birthright=v161194x
label variable birthright "Opinion towards birthright citizenship (pre)"
replace birthright=1 if v161194x==7
replace birthright=2 if v161194x==6
replace birthright=3 if v161194x==5
replace birthright=5 if v161194x==3
replace birthright=6 if v161194x==2
replace birthright=7 if v161194x==1
replace birthright=. if v161194x==-8 | v161194x==-9
label define vallab36 1 "Oppose a great deal" 2 "Oppose a moderate amount" 3 "Oppose a little" 4 "Neither favor nor oppose" 5 "Favor a little" 6 "Favor a moderate amount" 7 "Favor a great deal"
label values birthright vallab36
codebook birthright

///some of the labels in this survey are worded kind of awkardly///



codebook v161195x
gen dreamers= v161195x
label variable dreamers "Summary- children brought illegally (pre)"
replace dreamers=. if v161195x== -8 | v161195x==-9
label define vallab37 1 "Should send back-favor a great deal" 2 "Should send back-favor a moderate amount" 3 "Should send back-favor a little" 4 " Should allow to stay- favor a little" 5 " Should allow to stay- favor a moderate amount" 6 " Should allow to stay- favor a great deal"
label values dreamers vallab37
codebook dreamers

gen dreamers_alt=v161195x
label variable dreamers_alt "Summary- children brought illegally (pre)"
replace dreamers_alt=. if v161195x== -8 | v161195x==-9
replace dreamers_alt=1 if v161195x==6
replace dreamers_alt=2 if v161195x==5
replace dreamers_alt=3 if v161195x==4
replace dreamers_alt=4 if v161195x==3
replace dreamers_alt=5 if v161195x==2
replace dreamers_alt=6 if v161195x==1
label define vallab38 6 "Should send back-favor a great deal" 5 "Should send back-favor a moderate amount" 4 "Should send back-favor a little" 3 " Should allow to stay- favor a little" 2 " Should allow to stay- favor a moderate amount" 1 " Should allow to stay- favor a great deal"
label values dreamers_alt vallab38
codebook dreamers_alt



codebook v161196x
gen wall=v161196x
label variable wall "Summary-build a wall with Mexico (pre)"
replace wall=1 if v161196x==7
replace wall=2 if v161196x==6
replace wall=3 if v161196x==5
replace wall=5 if v161196x==3
replace wall=6 if v161196x==2
replace wall=7 if v161196x==1
replace wall=. if v161196x==-8 | v161196x==-9
label values wall vallab36
codebook wall





codebook v161197
gen speak_english=v161197
label variable speak_english "How important to speak English in US
replace speak_english=1 if v161197==4
replace speak_english=2 if v161197==3
replace speak_english=3 if v161197==2
replace speak_english=4 if v161197==1
replace speak_english=. if v161197==-9
label define vallab39 1 "Not at all important" 2 "Not very important" 3 "Somewhat important" 4 "Very important"
label values speak_english vallab39
codebook speak_english








codebook v161198
tabulate v161198
gen black_assist=v161198
label variable black_assist "7pt scale gov't assistance to blacks: self-placemt"
replace black_assist=1 if v161198==7
replace black_assist=2 if v161198==6
replace black_assist=3 if v161198==5
replace black_assist=5 if v161198==3
replace black_assist=6 if v161198==2
replace black_assist=7 if v161198==1
replace black_assist=. if v161198==-9 | v161198==-8| v161198==99
label define vallab40 1 "Blacks should help themselves" 7 "Gov't should help Blacks"
label values black_assist vallab40
codebook black_assist



codebook v161204x
gen affirm_act=v161204x
label variable affirm_act "Favor/oppose affirmative action in universities"
replace affirm_act=1 if v161204x==7
replace affirm_act=2 if v161204x==6
replace affirm_act=3 if v161204x==5
replace affirm_act=5 if v161204x==3
replace affirm_act=6 if v161204x==2
replace affirm_act=7 if v161204x==1
replace affirm_act=. if v161204x==-8 | v161204x==-9
label values affirm_act vallab36
codebook affirm_act




codebook v161205
gen social_sec=v161205
label variable social_sec "Fed budget spending: social security"
replace social_sec=1 if v161205==2
replace social_sec=2 if v161205==3
replace social_sec=3 if v161205==1
replace social_sec=. if v161205==-8 | v161205==-9
label define vallab41 1 "Decreased" 2 "Kept the same" 3 "Increased"
label values social_sec vallab41
codebook social_sec


gen social_d= v161205
label variable social_d "Social security increase dummy"
replace social_d=0 if v161205==2 | v161205==3
replace social_d=. if v161205==-8 | v161205==-9
label define vallab42 1 "Soc sec should be increased" 0 "Decreased/kept the same"
label values social_d vallab42
codebook social_d


codebook v161206
gen p_schools= v161206
label variable p_schools "Fed budget spending: public schools"
replace p_schools=1 if v161206==2
replace p_schools=2 if v161206==3
replace p_schools=3 if v161206==1
replace p_schools=. if v161206==-8 | v161206==-9
label values p_schools vallab41
codebook p_schools



codebook v161207
gen spend_tech=v161207
label variable spend_tech "Fed budget spending: science and technology"
replace spend_tech=1 if v161207==2
replace spend_tech=2 if v161207==3
replace spend_tech=3 if v161207==1
replace spend_tech=. if v161207==-8 | v161207==-9
label values spend_tech vallab41
codebook spend_tech




codebook v161208
gen spend_crime=v161208
label variable spend_crime "Fed budget spending: dealing with crime"
replace spend_crime=1 if v161208==2
replace spend_crime=2 if v161208==3
replace spend_crime=3 if v161208==1
replace spend_crime=. if v161208==-8 | v161208==-9
label values spend_crime vallab41
codebook spend_crime




codebook v161209
gen spend_welfare=v161209
label variable spend_welfare "Federal budget spending: welfare programs"
replace spend_welfare=1 if v161209==2
replace spend_welfare=2 if v161209==3
replace spend_welfare=3 if v161209==1
replace spend_welfare=. if v161209==-8 | v161209==-9
label values spend_welfare vallab41
codebook spend_welfare


codebook v161210
gen spend_childcare=v161210
replace spend_childcare=1 if v161210==2
replace spend_childcare=2 if v161210==3
replace spend_childcare=3 if v161210==1
replace spend_childcare=. if v161210==-8 | v161210==-9
label values spend_childcare vallab41 
codebook spend_childcare


codebook v161211
gen spend_poor = v161211
label variable spend_poor "Fed budget spending: aid to the poor"
replace spend_poor=1 if v161211==2
replace spend_poor=2 if v161211==3
replace spend_poor=3 if v161211==1
replace spend_poor=. if v161211==-8 | v161211==-9
label values spend_poor vallab41
codebook spend_poor



codebook v161212
gen spend_envmt =v161212
label variable spend_envmt "Fed budget spending: protecting the environment"
replace spend_envmt=1 if v161212==2
replace spend_envmt=2 if v161212==3
replace spend_envmt=3 if v161212==1
replace spend_envmt=. if v161212==-8 | v161212==-9
label values spend_envmt vallab41
codebook spend_envmt


codebook v161213x
gen fight_isis= v161213x
label variable fight_isis "Send troops to fight ISIS"
replace fight_isis=1 if v161213x==7
replace fight_isis=2 if v161213x==6
replace fight_isis=3 if v161213x==5
replace fight_isis=5 if v161213x==3
replace fight_isis=6 if v161213x==2
replace fight_isis=7 if v161213x==1
replace fight_isis=. if v161213x==-8 | v161213x==-9
label values fight_isis vallab36
codebook fight_isis



codebook v161214x
gen refugees=v161214x
label variable refugees "Allow Syrian refugees"
replace refugees=1 if v161214x==7
replace refugees=2 if v161214x==6
replace refugees=3 if v161214x==5
replace refugees=5 if v161214x==3
replace refugees=6 if v161214x==2
replace refugees=7 if v161214x==1
replace refugees=. if v161214x==-8 | v161214x==-9
label values refugees vallab36
codebook refugees



codebook v161215
gen trust_gov=v161215
label variable trust_gov "Trust the govt in Wash to do what is right"
replace trust_gov=1 if v161215==5
replace trust_gov=2 if v161215==4
replace trust_gov=4 if v161215==2
replace trust_gov=5 if v161215==1
replace trust_gov=. if v161215==-8 | v161215==-9
label define vallab42b 1 "Never" 2 "Some of the time" 3 "About half the time" 4 "Most of the time" 5 "Always"
label values trust_gov vallab42b
codebook trust_gov



codebook v161216
gen represent=v161216
label variable represent "Gov't run by a few big interests or for benefit of all"
replace represent=. if v161216==-9 | v161216==-8
label define vallab43 1 "Run by a few big interests" 2 "Run for the benefit of all the people"
label values represent vallab43
codebook represent

gen represent_d= v161216
replace represent_d=0 if v161216==2
replace represent_d=. if v161216==-9 | v161216==-8
label define vallab44 0 "Run for the benefit of all people" 1 "Run by a few big interests"
label values represent_d vallab43
codebook represent_d

gen represent_d2=v161216
replace represent_d2=0 if v161216==1
replace represent_d2=1 if v161216==2
replace represent_d2=. if v161216==-9 | v161216==-8
label define vallab45 0 "Run by a few big interests" 1 "Run for the benefit of all people"
label values represent_d2 vallab45
codebook represent_d2



codebook v161217
gen gov_waste=v161217
label variable gov_waste "Does government waste tax money (pre)"
replace gov_waste=1 if v161217==3
replace gov_waste=3 if v161217==1
replace gov_waste=. if v161217==-8 | v161217==-9
label define vallab46 1 "Doesn't waste very much" 2 "Waste some" 3 "Waste a lot"
label values gov_waste vallab46
codebook gov_waste


codebook v161227x
gen serve_ssc= v161227x
label variable serve_ssc "Services to same sex couples (pre)"
replace serve_ssc=. if v161227x==-8 | v161227x==-9
label define vallab47 1 "Feel very strongly- should be allowed to refuse" 2 "Feel moderately strongly- should be allowed to refuse" 3 "Feel a little strongly- should be allowed to refuse" 4 "Feel a little strongly- should be required to provide services" 5 "Feel moderately strongly- should be required to provide services" 6 "Feel very strongly- should be required to provide services"
label values serve_ssc vallab47
codebook serve_ssc


codebook v161228x
gen trans= v161228x
label variable trans "Transgender policy re bathrooms (pre)"
replace trans=. if v161228x==-8 | v161228x==-9
label define vallab48 1 "Feel very strongly- bathroom of the gender born with" 2 "Feel moderately strongly- bathroom of the gender born with" 3 "Feel a little strongly- bathroom of the gender born with" 4 "Feel a little strongly- bathroom of identified gender" 5 "Feel moderately strongly- bathroom of identified gender" 6 "Feel very strongly- bathroom of identified gender" 
label values trans vallab48
codebook trans


codebook v161229x
gen gay_discrim=v161229x
label variable gay_discrim "Laws to protect gays and lesbians against job discrim"
replace gay_discrim=1 if v161229x==4
replace gay_discrim=2 if v161229x==3
replace gay_discrim=3 if v161229x==2
replace gay_discrim=4 if v161229x==1
replace gay_discrim=. if v161229x==-1
label define vallab49 1 "Oppose strongly" 2 "Oppose not strongly" 3 "Favor not strongly" 4 "Favor strongly"
label values gay_discrim vallab49
codebook gay_discrim


codebook v161231
gen gay_marriage=v161231
label variable gay_marriage "Pre"
replace gay_marriage=1 if v161231==3
replace gay_marriage=3 if v161231==1
replace gay_marriage=. if v161231==-8 | v161231==-9
label define vallab50 1 "There should be no legal recognition of a gay or lesbian couple's relationship" 2 "Gay and lesbian couples should be allowed to form civil unions but not legally marry" 3 "Gay and lesbian couples should be legally allowed to marry"
label values gay_marriage vallab50
codebook gay_marriage




codebook v161233x
gen d_penalty=v161233x
label variable d_penalty "Favor/oppose the death penalty (pre)"
replace d_penalty=1 if v161233x==4
replace d_penalty=2 if v161233x==3
replace d_penalty=3 if v161233x==2
replace d_penalty=4 if v161233x==1
replace d_penalty=. if v161233x==-1
label define vallab51 1 "Oppose strongly" 2 "Oppose not strongly" 3 "Favor not strongly" 4 "Favor strongly"
label values d_penalty vallab51
codebook d_penalty



codebook v161235x
gen econ_2008= v161235x
label variable econ_2008 "Economy since 2008 (pre)"
replace econ_2008=1 if v161235x==5
replace econ_2008=2 if v161235x==4
replace econ_2008=4 if v161235x==2
replace econ_2008=5 if v161235x==1
replace econ_2008=. if v161235x==-8 | v161235x==-9
label values econ_2008 vallab29
codebook econ_2008




codebook v161236
gen obama_angry=v161236
label variable obama_angry "Affect for Obama- angry (pre)
replace obama_angry=. if v161236==-8 | v161236==-9
label values obama_angry vallab1
codebook obama_angry


codebook v161237
gen obama_proud=v161237
label variable obama_proud "Affect for Obama-proud (pre)
replace obama_proud=. if v161237==-8 | v161237==-9
label values obama_proud vallab1
codebook obama_proud


codebook v161245
gen church_att= v161245
replace church_att=1 if v161245==5
replace church_att=2 if v161245==4
replace church_att=3 if v161245==3
replace church_att=4 if v161245==2
replace church_att=5 if v161245==1
replace church_att=. if v161245==-1| v161245==-9
label define vallab52 1 "Never" 2 "A few times a year" 3 "Once or twice a month" 4 "Almost every week" 5 "Every week"
label values church_att vallab52
codebook church_att



codebook v161264x
//// it says "coded full religion summary availabe in full release"... I checked the codebook and it says the same thing. Not sure what to do here////


codebook v161265x
tabulate v161265x
////same here////


codebook v161266c
gen born_again= v161266c
label variable born_again "Religious ID: born again Christian"
replace born_again=. if v161266c==-8 | v161266c==-9
label define vallab53 0 "Not selected" 1 "Selected"
label values born_again vallab53
codebook born_again




codebook v161266d
gen evangelical= v161266d
replace evangelical=. if v161266d==-8 | v161266d==-9
label values evangelical vallab53
codebook evangelical



codebook v161267
tabulate v161267
gen age=v161267
tabulate age
replace age=. if v161267==-8 | v161267==-9
label define vallab54 90 "90 and older"
label values age vallab54
tabulate age


codebook v161267x
tabulate v161267x
gen age_cat= v161267x
replace age_cat=. if v161267x==-1
label define vallab55 1 "18-20" 2 "21-24" 3 "25-29" 4 "30-34" 5 "35-39" 6 "40-44" 7 "45-49" 8 "50-54" 9 "55-59" 10 "60-64" 11 "65-69" 12 "70-74" 13 "75 and older"
label values age_cat vallab55
tabulate age_cat

gen age_c= v161267x
replace age_c=. if v161267x==-1
replace age_c=1 if v161267x==1 | v161267x==2
replace age_c=2 if v161267x==3 | v161267x==4
replace age_c=3 if v161267x==5 | v161267x==6
replace age_c=4 if v161267x==7 | v161267x==8
replace age_c=5 if v161267x==9 | v161267x==10
replace age_c=6 if v161267x==11 | v161267x==12
replace age_c=7 if v161267x==13
label define vallab56 1 "18-24" 2 "25-34" 3 "35-44" 4 "45-54" 5 "55-64" 6 "65-74" 7 "75 and older"
label values age_c vallab56
codebook age_c

////I coded age_c to have the same categories as the variable of the same name I made for 2008 CMPS////



codebook v161268
gen marital_status=v161268
replace marital_status=. if v161268==-9
replace marital_status=1 if v161268==1 | v161268==2
replace marital_status=2 if v161268==3
replace marital_status=3 if v161268==4
replace marital_status=4 if v161268==5
replace marital_status=5 if v161268==6
label define vallab57 1 "Married" 2 "Widowed" 3 "Divorced" 4 "Seperated" 5 "Never married"
label values marital_status vallab57
codebook marital_status 

gen married=v161268
replace married=1 if v161268==1 | v161268==2
replace married=0 if v161268==3 | v161268==4 | v161268==5 | v161268==6
replace married=. if v161268==-9
label define vallab58 0 "Single/widowed/divorced/seperated" 1 "Married"
label values married vallab58
codebook married

//// I included seperated in the non-married category because it was a seperate cat in the orignal variable. Should that be included within married?//
///should seperated be counted as single in this next variable?////
///I guess legally seperation counts as single for tax purposes, but idk if that's what this measures///



gen single= v161268
replace single=1 if v161268==6 | v161268==5 | v161268==4 | v161268==3
replace single=0 if v161268==1 | v161268==2
replace single=. if v161268==-9
label define vallab59 0 "Married" 1 "Single"
label values single vallab59
codebook single


codebook v161269
gen domestic_ptnr=v161269
label variable domestic_ptnr "Domestic partnership status"
replace domestic_ptnr=0 if v161269==2
replace domestic_ptnr=. if v161269==-1 | v161269==-9
label define vallab60 0 "No, not living with a partner" 1 "Yes, living with a a partner"
label values domestic_ptnr vallab60
codebook domestic_ptnr



codebook v161270
tabulate v161270
gen education=v161270
replace education=1 if v161270<9 
replace education=2 if v161270==9
replace education=3 if v161270==10| v161270==11 | v161270==12
replace education=4 if v161270==13
replace education=5 if v161270>13
replace education=. if v161270==-9 | v161270 ==90 | v161270==95
label define vallab61 1 "No HS diploma" 2 "HS diploma" 3 "Some college/associates" 4 "Bachelor's degree" 5 "Post-grad degree"
label values education vallab61
codebook education

gen college= v161270
replace college=1 if v161270>12
replace college=0 if v161270<=12
replace college=. if v161270==-9 | v161270==90 | v161270==95
label define vallab62 0 "No college degree" 1 "College degree"
label values college vallab62
codebook college


codebook v161271
gen hs_dip=v161271
label variable hs_dip "High school completion-diploma or GED"
replace hs_dip=. if v161271==-1 | v161271==-9
label define vallab63 1 "Graduation from HS" 2 "GED or other equivalent"
label values hs_dip vallab63
codebook hs_dip


codebook v161274a
gen mil_service=v161274a
label variable mil_service "Previously served on active duty in armed forces (pre)"
replace mil_service=. if v161274a==-9
label define vallab64 0 "Have never served on active duty" 1 "Have previously served on active duty"
label values mil_service vallab64
codebook mil_service 



codebook v161274b
///this variable has restricted access///



codebook v161302
gen union=v161302
label variable union "Anyone in HH belong to labor union (pre)"
replace union=0 if v161302==2
replace union=. if v161302==-9 | v161302==-8
label define vallab65 0 "No" 1 "Yes"
label values union vallab65
codebook union

///I copied the description from the original variable and I'm not sure what HH means"



codebook v161308x
////"coded summary will be available in future release"////



codebook v161310x
gen race=v161310x 
replace race=. if v161310x==-9
label define vallab66 1 "White, non-Hispanic" 2 "Black, non-Hispanic" 3 "Asian, native Hawaiian, or other Pacif Islr" 4 "Native American or Alaska Native, non- Hispanic" 5 "Hispanic" 6 "Other"
label values race vallab66
codebook race


gen white=v161310x
replace white=0 if v161310x>1
replace white=. if v161310x==-9
label define vallab67 0 "Non-white" 1 "White"
label values white vallab67
codebook white

gen black=v161310x
replace black=. if v161310x==-9
replace black=1 if v161310x==2
replace black=0 if v161310x==1 | v161310x>2
label define vallab68 0 "Non-black" 1 "Black"
label values black vallab68
codebook black

gen asian= v161310x
replace asian=1 if v161310x==3
replace asian=0 if v161310x==1 | v161310x==2| v161310x>3
replace asian=. if v161310x==-9
label define vallab69 0 "Non-Asian" 1 "Asian"
label values asian vallab69
codebook asian

gen hispanic=v161310x
replace hispanic=1 if v161310x==5
replace hispanic=0 if v161310x<5 | v161310x==6
replace hispanic=. if v161310x==-9
label define vallab70 0 "Non-Hispanic" 1 "Hispanic"
label values hispanic vallab70
codebook hispanic



codebook v161315
gen us_parent= v161315
label variable us_parent "Native status of parents"
replace us_parent=. if v161315==-8| v161315==-9
label define vallab71 1 "Both parents born in US" 2 "One parent born in US" 3 "Both parents born in another country"
label values us_parent vallab71 
codebook us_parent

gen first_gen= v161315
label variable first_gen "Both parents born in another country"
replace first_gen=. if v161315==-8 |  v161315==-9
replace first_gen=1 if v161315==3
replace first_gen=0 if v161315==1 | v161315==2
label define vallab72 0 "One/both parents born in US" 1 "Both parents born in another country"
label values first_gen vallab72
codebook first_gen



codebook v161316
gen birth_place= v161316
label variable birth_place "Rs: born US, Puerto Rico, or some other country"
replace birth_place=. if v161316==-9 | v161316==-8| v161316==7
label define vallab73 1 "US State/DC" 2 "Puerto Rico" 3 "Another US/territory" 4 "Another country"
label values birth_place vallab73
codebook birth_place

gen born_us= v161316
replace born_us= 1 if v161316==2| v161316==3
replace born_us=0 if v161316==4
replace born_us=. if v161316==-9 | v161316==-8| v161316==7
label define vallab74 0 "Born elsewhere" 1 "Born in the US/US territory"
label values born_us vallab74
codebook born_us


codebook v161317
gen second_gen= v161317
label variable second_gen "How many grandparents born outside the US"
replace second_gen=. if v161317==-9 | v161317==-8
label define vallab75 0 "None" 1 "One" 2 "Two" 3 "Three" 4 "All"
label values second_gen vallab75
codebook second_gen


codebook v161331x
tabulate v161331x
gen length_live= v161331x
label variable length_live "Length living in current community"
replace length_live=. if v161331x==-9
label define vallab76 1 "1 year or less" 40 "40 years or more"
label values length_live vallab76
codebook length_live


codebook v161334
gen hm_ownership= v161334
replace hm_ownership=. if v161334==-8 | v161334==-9
label define vallab77 1 "Pay rent" 2 "Pay mortgage" 3 "Own home with no payments due" 4 "Some other arrangement"
label values hm_ownership vallab77
codebook hm_ownership

gen home_owner=v161334
replace home_owner=. if v161334==-8 | v161334==-9 
replace home_owner=1 if v161334==2 | v161334==3
replace home_owner=0 if v161334==1 | v161334==4
label define vallab78 0 "Renter/other" 1 "Home owner"
label values home_owner vallab78
codebook home_owner



codebook v161337
tabulate v161337
gen current_address=v161337
label variable current_address "Years lived at address"
replace current_address=. if v161337==-9 | v161337==-8
label define vallab79 1 "0-1" 2 "2-3" 3 "4-5" 4 "6-7" 5 "8-9" 6 "10-14" 7 "15-19" 8 "20-29" 9 "30+"
label values current_address vallab79
codebook current_address


codebook v161343
gen rough_up=v161343
label variable rough_up "When protesters get 'roughed' up for disrupting political events,  how much do they generally deserve what happens to them? (pre)"
replace rough_up=. if v161343==-9| v161343==-5
label define vallab80 1 "Not at all" 2 "A little" 3 "A moderate amount" 4 "A lot" 5 "A great deal"
label values rough_up vallab80
codebook rough_up

codebook v161344
gen just_violence=v161344
label variable just_violence "How much do you feel it is justified for people to use violence to pursue their political goals in this country? (pre)"
replace just_violence=. if v161344==-9 | v161344==-5
label values just_violence vallab80
codebook just_violence


codebook v161350
gen investor= v161350
label variable investor "Do you, personally or jointly, have money invested in the stock market right now?"
replace investor=. if v161350==-9 | v161350==-5
replace investor=0 if v161350==2
label define vallab81 0 "No" 1 "Yes"
label values investor vallab81
codebook investor


codebook v161361x
tabulate v161361x
gen income=v161361x
replace income=1 if v161361x<=6
replace income=2 if v161361x>6
replace income=3 if v161361x>12
replace income=4 if v161361x>16
replace income=5 if v161361x>20
replace income=6 if v161361x>22
replace income=7 if v161361x>25
label define vallab82 1 "Less than 20,000" 2 "20,000 to 39,999" 3 "40,000 to 59,999" 4 "60,000 to 79,999" 5 "80,000 to 99,999" 6 "100,000, to 150,000" 7 "More than 150,000"
label values income vallab82
codebook income 
tabulate income

codebook v161511
gen sex_orient= v161511
replace sex_orient =. if v161511==-9 | v161511==-5
replace sex_orient=2 if v161511==3
replace sex_orient=3 if v161511==2
label define vallab83 1 "Heterosexual" 2 "Bisexual" 3 "Homosexual"
label values sex_orient vallab83
codebook sex_orient


codebook v161512
gen know_gays=v161512
label variable know_gays "Among your immediate family, relatives, neighbors, co-workers, or close friends, are any of them gay, lesbian, or bisexual as far as you know?"
replace know_gays=. if v161512==-9 | v161512==-5
replace know_gays=0 if v161512==2
label values know_gays vallab81
codebook know_gays




////Post election////


codebook v162022
gen register = v162022
label variable register "R registered to vote (post)"
replace register=. if v162022==-8 | v162022==-9 | v162022==-6 | v162022==-7 | v162022==-1
replace register=0 if v162022==3
replace register=1 if v162022==2
label define vallab84 0 "Not currently registered" 1 "Registered"
label values register vallab84 
codebook register







codebook v162023




codebook v162030x
gen party_regp= v162030x
label variable party_regp "Party of registration (post)"
replace party_regp=. if v162030x==-9 | v162030x==-8 | v162030x==-1
replace party_regp=2 if v162030x==4 | v162030x==5
replace party_regp=2 if v162030x==2
label define vallab85 1 "Democratic Party" 2 "Independent/other" 3 "Republican"
label values party_regp vallab85
codebook party_regp


codebook v162031x
gen voted_b= v162031x
label variable voted_b "Did R vote in 2016 (post)
replace voted_b=. if v162031x==-8 | v162031x==-1
label define vallab86 1 "Voted in 2016" 0 "Didn't vote in 2016"
label values voted_b vallab86
codebook voted_b

codebook v162033x
//unsure what this even means exactly//

codebook v162038x
tabulate v162038x
gen pres_prefdv =v162038x
label variable pres_prefdv "Preference for President (did not vote) (post)"
replace pres_prefdv=1 if v162038x==10
replace pres_prefdv=2 if v162038x==11
replace pres_prefdv=3 if v162038x==20
replace pres_prefdv=4 if v162038x==21
replace pres_prefdv=5 if v162038x==30
replace pres_prefdv=6 if v162038x==31
replace pres_prefdv=7 if v162038x==40
replace pres_prefdv=8 if v162038x==41
replace pres_prefdv=9 if v162038x==50
replace pres_prefdv=10 if v162038x==51
replace pres_prefdv=. if v162038x==-7 |v162038x==-6 | v162038x==-1
label define vallab87 1 "Clinton- not strong" 2 "Clinton- strong" 3 "Trump-not strong" 4 "Trump-strong" 5 "Johnson-not strong" 6 "Johnson-strong" 7 "Stein- not strong" 8 "Stein-strong" 9 "Other-not strong" 10 "Other-strong"
label values pres_prefdv vallab87
codebook pres_prefdv



codebook v162045x
tabulate v162045x
//unsure what values mean exactly///

codebook v162059x
gen house_vote=v162059x
label variable house_vote "Party of House vote/ preference (post)"
replace house_vote=1 if v162059x==10
replace house_vote=2 if v162059x==30
replace house_vote=3 if v162059x==11
replace house_vote=4 if v162059x==31
replace house_vote=5 if v162059x==12
replace house_vote=6 if v162059x==32
replace house_vote=. if v162059x==-7 | v162059x==-6 | v162059x==-1
label define vallab88 1 "Democrat- voted" 2 "Democrat-nonvoter" 3 "Republican-voted" 4 "Republican-nonvoter" 5 "Other-voted" 6 "Other-nonvoter"
label values house_vote vallab88
codebook house_vote 



codebook v162060x
gen senate_vote=v162060x
label variable senate_vote "Party of Senate vote/preference (post)"
replace senate_vote=1 if v162060x==10
replace senate_vote=2 if v162060x==30
replace senate_vote=3 if v162060x==11
replace senate_vote=4 if v162060x==31
replace senate_vote=5 if v162060x==12
replace senate_vote=6 if v162060x==32
replace senate_vote=. if v162060x==-7 | v162060x==-6 | v162060x==-1
label values senate_vote vallab88
codebook senate_vote



codebook v162061x
gen gub_vote= v162061x
label variable gub_vote "Party of gubernatorial vote/preference (post)"
replace gub_vote=1 if v162061x==10
replace gub_vote=2 if v162061x==30
replace gub_vote=3 if v162061x==11
replace gub_vote=4 if v162061x==31
replace gub_vote=5 if v162061x==12
replace gub_vote=6 if v162061x==32
replace gub_vote=. if v162061x==-6 | v162061x==-7 | v162061x==-1
label values gub_vote vallab88
codebook gub_vote



codebook v162082
tabulate v162082
gen dhouse_ftherm= v162082
label variable dhouse_ftherm "Feeling Thermometer: House Democratic candidate (post)"
replace dhouse_ftherm=. if v162082==-9 | v162082==-7 | v162082==-6 | v162082==-1 | v162082==998 | v162082==999
codebook dhouse_ftherm



codebook v162083
gen rhouse_ftherm= v162083
label variable rhouse_ftherm "Feeling thermometer: House Republican candidate (post)"
replace rhouse_ftherm=. if v162083==-9 | v162083==-7 | v162083==-6 | v162083==-1 | v162083==998 | v162083==999
codebook rhouse_ftherm


codebook v162084
tabulate v162084
gen ihouse_ftherm=v162084
label variable ihouse_ftherm "Feeling thermometer: House ind/3rd party candidate (post)"
replace ihouse_ftherm=. if v162084==-9 | v162084==-7 | v162084==-6 | v162084==-1 | v162084==998 | v162084==999
codebook ihouse_ftherm


codebook v162085
gen dsen_ftherm=v162085
label variable dsen_ftherm "Feeling thermometer: Senate Democratic candidate (post)"
replace dsen_ftherm=. if v162085==-9 | v162085==-7 | v162085==-6 | v162085==-1 | v162085==998 | v162085==999
codebook dsen_ftherm

codebook v162086
gen rsen_ftherm=v162086
label variable rsen_ftherm "Feeling thermometer: Senate Republican candidate (post)"
replace rsen_ftherm=. if v162086==-9 | v162086==-7 | v162086==-6 | v162086==-1 | v162086==998 | v162086==999
codebook rsen_ftherm




codebook v162087
gen isen_ftherm=v162087
label variable isen_ftherm "Feeling thermometer: Senate ind/3rd party candidate (post)"
replace isen_ftherm=. if v162087==-7| v162087==-6 | v162087==-1 | v162087==998| v162087==999
codebook isen_ftherm


codebook v162088
gen srsen_ftherm=v162088
label variable srsen_ftherm "Feeling thermometer: Sr Senator in state without race (post)"
replace srsen_ftherm=. if v162088==-9 | v162088==-7 | v162088==-6 | v162088==-1 | v162088==998 | v162088==999
codebook srsen_ftherm


codebook v162089
gen jrsen_ftherm= v162089
label variable jrsen_ftherm "Feeling thermometer: Jr Sen in state without race (post)"
replace jrsen_ftherm=. if v162089==-9 | v162089==-7 | v162089==-6| v162089==-1 | v162089==998 | v162089==999
codebook jrsen_ftherm


codebook v162090
gen nrsen_ftherm=v162090
label variable nrsen_ftherm "Feeling therm: Nonrunning senator in state w/race (post)"
replace nrsen_ftherm=. if v162090==-9 | v162090==-7 | v162090==-6 | v162090==-1 | v162090==998 | v162090==999
codebook nrsen_ftherm


codebook v162091
gen dvp_ftherm_p=v162091
label variable dvp_ftherm_p "Feeling thermometer: Democratic Vice Presidential candidate (post)"
replace dvp_ftherm_p=. if v162091==-9| v162091==-7| v162091==-6 | v162091==-1 | v162091==999| v162091==998
codebook dvp_ftherm_p


codebook v162113
gen blm_ftherm=v162113
label variable blm_ftherm "Feeling thermometer: Black Lives Matter (post)"
replace blm_ftherm=. if v162113<0 | v162113> 100
codebook blm_ftherm



codebook v162096
gen ftherm_feminists=v162096
label variable ftherm_feminists "Feeling thermometer: Black Lives Matter (post)"
replace ftherm_feminists=. if v162096<0 | v162096> 100
codebook ftherm_feminists



codebook v162125x
gen flag_react= v162125x
label variable flag_react "How good/bad does R feel to see American flag (post)"
tabulate v162125x
replace flag_react=. if v162125x==-9 | v162125x==-7 | v162125x==-6
replace flag_react=1 if v162125x==7
replace flag_react=2 if v162125x==6
replace flag_react=3 if v162125x==5
replace flag_react=5 if v162125x==3
replace flag_react=6 if v162125x==2
replace flag_react=. if v162125x==1
label define vallab89 1 "Extremely bad" 2 "Moderately bad" 3 "A little bad" 4 "Neither good nor bad" 5 "A little good" 6 "Moderately good" 7 "Extremely good"
label values flag_react vallab89
codebook flag_react


codebook v162132
gen class= v162132
replace class=. if v162132==-9 | v162132==-8 | v162132==-7| v162132==-6|v162132==-1
label define vallab90 1 "Lower class" 2 "Working class" 3 "Middle class" 4 "Upper class"
label values class vallab90
codebook class


codebook v162133
gen mid_class=v162133
replace mid_class=. if v162133==-9| v162133==-7| v162133==-6| v162133==-1
label define vallab91 1 "Lower middle class" 2 "Middle class" 3 "Upper middle class"
label values class vallab90

////is there a way to add to combine these previous two variables?///


codebook v162136x
tabulate v162136x
gen econ_mob= v162136x
label variable econ_mob "Economic mobility easier/harder compared to 20 yrs ago"
replace econ_mob=. if v162136x==-9| v162136x==-8| v162136x==-7| v162136x==-6
label define vallab91b 1 "A great deal easier" 2 "A moderate amount easier" 3 "A little easiers" 4 "The same" 5 "A little harder" 6 "A moderate amount harder" 7 "A great deal harder"
label values econ_mob vallab91b
codebook econ_mob


codebook v162157
gen im_level= v162157
label variable im_level "What should immigration levels be (post)"
replace im_level=. if v162157==-9 | v162157==-8| v162157==-7| v162157==-6
replace im_level=5 if v162157==1
replace im_level=4 if v162157==2
replace im_level=2 if v162157==4
replace im_level=1 if v162157==5
label define vallab92 1 "Decreased a lot" 2 "Decreased a little" 3 "Left the same is it is now" 4 "Increased a little" 5 "Increased a lot"
label values im_level vallab92
codebook im_level




codebook v162158
gen im_jobs=v162158
label variable im_jobs "How likely immigration will take away jobs (post)"
replace im_jobs=1 if v162158==4
replace im_jobs=2 if v162158==3
replace im_jobs=3 if v162158==2
replace im_jobs=4 if v162158==1
replace im_jobs=. if v162158==-9| v162158==-8| v162158==-7| v162158==-6
label define vallab93 1 "Not likely at all" 2 "Somewhat likely" 3 "Very likely" 4 "Extremely likely"
label values im_jobs vallab93
codebook im_jobs


codebook v162159
gen china_mil=v162159
label variable china_mil "China military threat"
replace china_mil=. if v162159==-9| v162159==-8| v162159==-7| v162159==-6
replace china_mil=1 if v162159==3
replace china_mil=3 if v162159==1
label define vallab94 1 "Not a threat" 2 "Minor threat" 3 "Major threat"
label values china_mil vallab94
codebook china_mil




codebook v162160
gen terror_worry=v162160
label variable terror_worry "How worried about terrorist attack in the next 12 months (post)"
replace terror_worry=. if v162160==-9| v162160==-8| v162160==-7| v162160==-6
replace terror_worry=5 if v162160==1
replace terror_worry=4 if v162160==2
replace terror_worry=2 if v162160==4
replace terror_worry=1 if v162160==5
label define vallab95 1 "Not at all worried" 2 "Slightly worried" 3 "Moderately worried" 4 "Very worried" 5 "Extremely worried"
label values terror_worry vallab95
codebook terror_worry



codebook v162168
gen free_think=v162168
label variable free_think "Country needs free thinkers (post)"
replace free_think=. if v162168==-9| v162168==-8| v162168==-7| v162168==-6
replace free_think=1 if v162168==5
replace free_think=2 if v162168==4
replace free_think=4 if v162168==2
replace free_think=5 if v162168==1
label define vallab96 1 "Disagree strongly" 2 "Disagree somewhat" 3 "Neither agree nor disagree" 4 "Agree somewhat" 5 "Agree strongly"
label values free_think vallab96
codebook free_think


codebook v162169
gen rotten_apples=v162169
label variable rotten_apples "Country would be great by getting rid of rotten apples"
replace rotten_apples=. if v162169==-9| v162169==-8| v162169==-7| v162169==-6
replace rotten_apples=1 if v162169==5
replace rotten_apples=2 if v162169==4
replace rotten_apples=4 if v162169==2
replace rotten_apples=5 if v162169==1
label values rotten_apples vallab96
codebook rotten_apples


codebook v162170
gen strong_lead=v162170
label variable strong_lead "Country needs strong leader to take us back to the true path"
replace strong_lead=. if v162170==-9| v162170==-8| v162170==-7|v162170==-6
replace strong_lead=1 if v162170==5
replace strong_lead=2 if v162170==4
replace strong_lead=4 if v162170==2
replace strong_lead=5 if v162170==1
label values strong_lead vallab96
codebook strong_lead


codebook v162171
tabulate v162171
gen ideo7_p= v162171
label variable ideo7_p "7pt ideo scale (post)"
replace ideo7_p=. if v162171==-9 | v162171==-7| v162171==-6| v162171==99
label define vallab97 1 "Extremely liberal" 2 "Liberal" 3 "Slightly liberal" 4 "Moderate" 5 "Slightly conservative" 6 "Conservative" 7 "Extremely conservative"
label values ideo7_p vallab97
codebook ideo7_p

codebook v162171a
gen ideo_unsure= v162171a
label variable ideo_unsure "If had to choose, liberal or conservative"
replace ideo_unsure=. if v162171a==-9 | v162171a==-8 |v162171a==-7| v162171a==-6 |v162171a==-1
replace ideo_unsure=3 if v162171a==2
replace ideo_unsure=2 if v162171a==3
label define vallab97a 1 "Liberal" 2 "Moderate" 3 "Conservative"
label values ideo_unsure vallab97a
codebook ideo_unsure

codebook v162193x
tabulate v162193x
gen health_spend=v162193x
label variable health_spend "Increase/Decrease gov spending on health care (post)"
replace health_spend=. if v162193x==-9| v162193x==-8| v162193x==-7| v162193x==-6
replace health_spend=1 if v162193x==7
replace health_spend=2 if v162193x==6
replace health_spend=3 if v162193x==5
replace health_spend=5 if v162193x==3
replace health_spend=6 if v162193x==2
replace health_spend=7 if v162193x==1
label define vallab98 1 "Decrease a great deal" 2 "Decrease a moderate amount" 4 "Decrease a little" 4 "No change" 5 "Increase a litte" 6 "Increase a moderate amount" 7 "Increase a great deal"
label values health_spend vallab98
codebook health_spend




codebook v162223
gen eng_span=v162223
label variable eng_span "Hispanic: how much R uses English or Spanish (post)"
replace eng_span=. if v162223==-6| v162223==-7| v162223==-1
label define vallab99 1 "English and little or no Spanish" 2 "Mostly English but Spanish at least some of the time" 3 "Both English and Spanish most equally" 4 "Mostly Spanish but English at least some of the time" 5 "Spanish and little or no English"
label values eng_span vallab99
codebook eng_span

codebook v162224
gen hs_lf=v162224
label variable hs_lf "Hisp R: life affected by what happens to Hispanics (post)"
replace hs_lf=. if v162224==-1 | v162224==-6| v162224==-7| v162224==-8
replace hs_lf=1 if v162224==4
replace hs_lf=2 if v162224==3
replace hs_lf=3 if v162224==2
replace hs_lf=4 if v162224==1
label define vallab100 1 "Not at all" 2 "Not very much" 3 "Some" 4 "A lot"
label values hs_lf vallab100
codebook hs_lf



codebook v162238x
gen blk_pref= v162238x
label variable blk_pref "Preferential hiring and promotion of blacks (post)"
replace blk_pref=1 if v162238x==5
replace blk_pref=2 if v162238x==4
replace blk_pref=3 if v162238x==2
replace blk_pref=4 if v162238x==1
replace blk_pref=. if v162238x==-9 | v162238x==-8| v162238x==-7| v162238x==-6
label define vallab101 1 "Strongly against" 2 "Not strongly against" 3 "Not strongly for" 4 "Strongly for"
label values blk_pref vallab101
codebook blk_pref


codebook v162239
gen child_ind= v162239
label variable child_ind "Child trait more important: independence or respect"
replace child_ind=. if v162239==-9| v162239==-8| v162239==-7 | v162239==-6
label define vallab102 1 "Independence" 2 "Respect for elders" 3 "Both"
label values child_ind vallab102
codebook child_ind


codebook v162240
gen child_curious =v162240
label variable child_curious "Child trait more important: curiousity or good manners"
replace child_curious=. if v162240==-9| v162240==-8| v162240==-7| v162240==-6
label define vallab103 1 "Curiosity" 2 "Good manners" 3 "Both"
label values child_curious vallab103
codebook child_curious



codebook v162241
gen child_obedience =v162241
label variable child_obedience "Child trait more important: obedience or self-reliance"
replace child_obedience=. if v162241==-9| v162241==-8| v162241==-7| v162241==-6
label define vallab104 1 "Obedience" 2 "Self-reliance" 3 "Both"
label values child_obedience vallab104
codebook child_obedience



codebook v162242
gen child_behaved=v162242
label variable child_behave "Child trait more important: considerate or well-behaved"
replace child_behave=. if v162242==-9| v162242==-8| v162242==-7| v162242==-6
label define vallab105 1 "Being considerate" 2 "Well behaved" 3 "Both"
label values child_behave vallab105
codebook child_behave



codebook v162243
gen equal_op= v162243
label variable equal_op "Society should make sure everyone has equal opportunity"
replace equal_op=. if v162243==-9| v162243==-8| v162243==-7| v162243==-6
replace equal_op=1 if v162243==5
replace equal_op=2 if v162243==4
replace equal_op=4 if v162243==2
replace equal_op=5 if v162243==1
label values equal_op vallab96
codebook equal_op


codebook v162244
gen worried_eqty=v162244
label variable worried_eqty "We'd be better off if worried less about equality"
replace worried_eqty=. if v162244==-9| v162244==-8| v162244==-7| v162244==-6
replace worried_eqty=1 if v162244==5
replace worried_eqty=2 if v162244==4
replace worried_eqty=4 if v162244==2
replace worried_eqty=5 if v162244==1
label values worried_eqty vallab96 
codebook worried_eqty



codebook v162245
gen chance_life= v162245
label variable chance_life "Not a big problem if some have more chance in life"
replace chance_life=. if v162245==-9| v162245==-8| v162245==-7| v162245==-6
replace chance_life=1 if v162245==5
replace chance_life=2 if v162245==4
replace chance_life=4 if v162245==2
replace chance_life=5 if v162245==1
label values chance_life vallab96
codebook chance_life



codebook v162246
gen treat_fairly=v162246
label variable treat_fairly "If people were treated more fairly there would be fewer probs"
replace treat_fairly=. if v162246==-9| v162246==-8| v162246==-7| v162246==-6
replace treat_fairly=1 if v162246==5
replace treat_fairly=2 if v162246==4
replace treat_fairly=4 if v162246==2
replace treat_fairly=5 if v162246==1
label values treat_fairly vallab96
codebook treat_fairly



codebook v162248
gen strong_opinions=v162248
label variable strong_opinions "R likes to have strong opinions even when not personally involved"
replace strong_opinions=. if v162248==-9| v162248==-8| v162248==-7| v162248==-6
label define vallab106 1 "Extremely uncharacteristic of me" 2 "Somewhat uncharacteristic of me" 3 "Uncertain" 4 "Somewhat characteristic of me" 5 "Extremely characteristic of me"
label values strong_opinions vallab106
codebook strong_opinions

codebook v162249
tabulate v162249
gen form_opinions=v162249
label variable form_opinions "R forms opinions about everything"
replace form_opinions=. if v162249==-9| v162249==-8| v162249==-7| v162249==-6| v162249==-1
label values form_opinions vallab106 
codebook form_opinions


codebook v162250
gen opinion_imp=v162250
label variable opinion_imp "Important for R to hold strong opinions"
replace opinion_imp=. if v162250==-9| v162250==-8| v162250==-7| v162250==-6| v162250==-1
label values opinion_imp vallab106
codebook opinion_imp


codebook v162251
gen bother_neutral=v162251
label variable bother_neutral "It bothers R to remain neutral"
replace bother_neutral=. if v162251==-7| v162251==-6| v162251==-1
label values bother_neutral vallab106
codebook bother_neutral


codebook v162252
gen more_opinions=v162252
label variable more_opinions "R has many more opinions than the average person"
replace more_opinions=. if v162252==-7| v162252==-6| v162252==-1
label values more_opinions vallab106
codebook more_opinions



codebook v162253
tabulate v162253
gen no_opinion=v162253
label variable no_opinion "R would rather have strong opinions than no opinions"
replace no_opinion=. if v162253==-9| v162253==-8| v162253==-7| v162253==-6| v162253==-1
label values no_opinion vallab106
codebook no_opinion




codebook v162255x
tabulate v162255x
gen obama_muslim=v162255x
replace obama_muslim=. if v162255x==-9| v162255x==-8| v162255x==-7| v162255x==-6
replace obama_muslim=1 if v162255x==10
replace obama_muslim=2 if v162255x==9
replace obama_muslim=3 if v162255x==8
replace obama_muslim=4 if v162255x==7
replace obama_muslim=5 if v162255x==6
replace obama_muslim=6 if v162255x==5
replace obama_muslim=7 if v162255x==4
replace obama_muslim=8 if v162255x==3
replace obama_muslim=9 if v162255x==2
replace obama_muslim=10 if v162255x==1
label define vallab107 1 "Extremely sure Obama not a Muslim" 2 "Very sure Obama not a Muslim"  3 "Moderately sure Obama not a Muslim" 4 "A little sure Obama not a Muslim" 5 "Not sure at all sure Obama not a Muslim" 6 "Not sure at all sure Obama is a Muslim" 7 "A little sure Obama is a Muslim" 8 "Moderately sure Obama is a Muslim" 9 "Very sure Obama is a Muslim" 10 "Extremely sure Obama is a Muslim"
label values obama_muslim vallab107
codebook obama_muslim





codebook v162263
gen strong_leader=v162263
label variable strong_leader "Strong leader is good for the US even if bends rules to get things done"
replace strong_leader=. if v162263==-9| v162263==-8| v162263==-7| v162263==-6
replace strong_leader=1 if v162263==5
replace strong_leader=2 if v162263==4
replace strong_leader=4 if v162263==2
replace strong_leader=5 if v162263==1
label values strong_leader vallab96
codebook strong_leader



codebook v162268
gen imgrnt_econ=v162268
label variable imgrnt_econ "Immigrants are generally good for America's economy"
replace imgrnt_econ=. if v162268==-9| v162268==-8| v162268==-7| v162268==-6
replace imgrnt_econ=1 if v162268==5
replace imgrnt_econ=2 if v162268==4
replace imgrnt_econ=4 if v162268==2
replace imgrnt_econ=5 if v162268==1
label values imgrnt_econ vallab96
codebook imgrnt_econ


codebook v162269
gen imgrnt_culture=v162269
label variable imgrnt_culture "America's culture is generally harmed by immigrants"
replace imgrnt_culture=. if v162269==-9| v162269==-8| v162269==-7| v162269==-6
replace imgrnt_culture=1 if v162269==5
replace imgrnt_culture=2 if v162269==4
replace imgrnt_culture=4 if v162269==2
replace imgrnt_culture=5 if v162269==1
label values imgrnt_culture vallab96
codebook imgrnt_culture




codebook v162270
gen imgrnt_crime=v162270
label variable imgrnt_crime "Immigrants increase crime rates in the U.S."
replace imgrnt_crime=. if v162270==-9| v162270==-8| v162270==-7| v162270==-6
replace imgrnt_crime=1 if v162270==5
replace imgrnt_crime=2 if v162270==4
replace imgrnt_crime=4 if v162270==2
replace imgrnt_crime=5 if v162270==1
label values imgrnt_crime vallab96
codebook imgrnt_crime



codebook v162271
gen tru_american=v162271
label variable tru_american  "To be truly American important to have been born in U.S."
replace tru_american=. if v162271==-9| v162271==-8| v162271==-7| v162271==-6
replace tru_american=1 if v162271==4
replace tru_american=2 if v162271==3
replace tru_american=3 if v162271==2
replace tru_american=4 if v162271==1
label define vallab108 1 "Not important at all" 2 "Not very important" 3 "Fairly important" 4 "Very important"
label values tru_american vallab108
codebook tru_american



codebook v162272
gen us_ancestry=v162272
label variable us_ancestry "To be truly American important to have American ancestry"
replace us_ancestry=. if v162272==-9| v162272==-8| v162272==-7| v162272==-6
replace us_ancestry=1 if v162272==4
replace us_ancestry=2 if v162272==3
replace us_ancestry=3 if v162272==2
replace us_ancestry=4 if v162272==1
label values us_ancestry vallab108
codebook us_ancestry



codebook v162273
gen speak_eng=v162273
label variable speak_eng "To be truly American important to speak English"
replace speak_eng=. if v162273==-9| v162273==-8| v162273==-7| v162273==-6
replace speak_eng=1 if v162273==4
replace speak_eng=2 if v162273==3
replace speak_eng=3 if v162273==2
replace speak_eng=4 if v162273==1
label values speak_eng vallab108
codebook speak_eng


codebook v162274
gen follow_customs=v162274
label variable follow_customs "To be truly American important to follow America's customs/traditions"
replace follow_customs=. if v162274==-9| v162274==-8| v162274==-7| v162274==-6
replace follow_customs=1 if v162274==4
replace follow_customs=2 if v162274==3
replace follow_customs=3 if v162274==2
replace follow_customs=4 if v162274==1
label values follow_customs vallab108
codebook follow_customs


codebook v162275
gen corrupt=v162275
label variable corrupt "How widespread is corruption amongst politicians in US"
replace corrupt=. if v162275==-9| v162275==-8| v162275==-7| v162275==-6
replace corrupt=1 if v162275==4
replace corrupt=2 if v162275==3
replace corrupt=3 if v162275==2
replace corrupt=4 if v162275==1
label define vallab109 1 "Hardly happens at all" 2 "Not very widespread" 3 "Quite widespread" 4 "Very widespread"
label values corrupt vallab109
codebook corrupt



codebook v162276
gen reduce_inq=v162276
label variable reduce_inq "Gov should take measures to reduce differences in income levels"
replace reduce_inq=1 if v162276==5
replace reduce_inq=2 if v162276==4
replace reduce_inq=4 if v162276==2 
replace reduce_inq=5 if v162276==1
replace reduce_inq=. if v162276==-9| v162276==-8| v162276==-7| v162276==-6
label values reduce_inq vallab96
codebook reduce_inq



codebook v162277
gen eight_yrs=v162277
label variable eight_yrs "Gov done a good or bad job in last 8 yrs"
replace eight_yrs=. if v162277==-9| v162277==-8| v162277==-7| v162277==-6
replace eight_yrs=1 if v162277==4
replace eight_yrs=2 if v162277==3
replace eight_yrs=3 if v162277==2
replace eight_yrs=4 if v162277==1
label define vallab110 1 "Very bad job" 2 "Bad job" 3 "Good job" 4 "Very good job"
label values eight_yrs vallab110
codebook eight_yrs



codebook v162310
tabulate v162310
gen ftherm_asams=v162310
label variable ftherm_asams "Feeling thermometer: Asian Americans"
replace ftherm_asams=. if v162310==-9| v162310==-7| v162310==-6| v162310==-5
codebook ftherm_asams


codebook v162311
tabulate v162311 
gen ftherm_hisp=v162311
label variable ftherm_hisp "Feeling thermometer: Hispanics"
replace ftherm_hisp=. if v162311==-9| v162311==-7| v162311==-6| v162311==-5
codebook ftherm_hisp



codebook v162312
gen ftherm_blacks=v162312
replace ftherm_blacks=. if v162312==-9| v162312==-8 | v162312==-7| v162312==-6| v162313==-5
codebook ftherm_blacks


codebook v162313
gen ftherm_ill =v162313
label variable ftherm_ill "Feeling thermometer: illegal immigrants"
replace ftherm_ill=. if v162313==-9| v162313==-8| v162313==-7| v162313==-6| v162313==-5
codebook ftherm_ill


codebook v162314
gen ftherm_whites=v162314
replace ftherm_whites=. if v162314==-9| v162314==-8| v162314==-7| v162314==-6| v162314==-5
codebook ftherm_whites


codebook v162107
gen ftherm_xtians=v162107
replace ftherm_xtians=. if v162107<0 | v162107>100
codebook ftherm_xtians

codebook v162106
gen ftherm_muslims=v162106
replace ftherm_muslims=. if v162106<0 | v162106>100
codebook ftherm_muslims

codebook v162108
gen ftherm_jews=v162108
replace ftherm_jews=. if v162108<0 | v162108>100
codebook ftherm_jews


codebook v162316
tabulate v162316
gen wh_worktgthr=v162316
label variable wh_worktgthr "How important is it for whites to work together to change laws unfair to whites"
replace wh_worktgthr=. if v162316==-9| v162316==-7| v162316==-6| v162316==-5| v162316==-1
replace wh_worktgthr=1 if v162316==5
replace wh_worktgthr=2 if v162316==4
replace wh_worktgthr=4 if v162316==2
replace wh_worktgthr=5 if v162316==1
label define vallab111 1 "Not at all important" 2 "A little important" 3 "Moderately important" 4 "Very important" 5 "Extremely important"
label values wh_worktgthr vallab111
codebook wh_worktgthr


codebook v162317
tabulate v162317
gen wh_jobs=v162317
label variable wh_jobs "How likely whites unable to find job b/c employers hire minorities"
replace wh_jobs=. if v162317==-9| v162317==-7| v162317==-6| v162317==-5| v162317==-1
replace wh_jobs=1 if v162317==5
replace wh_jobs=2 if v162317==4
replace wh_jobs=4 if v162317==2
replace wh_jobs=5 if v162317==1
label define vallab112 1 "Not at all likely" 2 "Slightly likely" 3 "Moderately likely" 4 "Very likely" 5 "Extremely likely"
label values wh_jobs vallab112
codebook wh_jobs



codebook v162318
gen treat_race=v162318
label variable treat_race "Fed gov treats blacks or whites better"
replace treat_race=. if v162318==-9| v162318==-7| v162318==-6| v162318==-5
label define vallab113 1 "Treats whites better" 2 "Treats both the same" 3 "Treats blacks better"
label values treat_race vallab113
codebook treat_race



codebook v162319
///how should I code this one?...it asks how much re the last quesion, but values each those that answered each way///
 




codebook v162320
gen cop_treatmnt=v162320
label variable cop_treatmnt "Police treat blacks or whites better"
replace cop_treatmnt=. if v162320==-9| v162320==-7| v162320==-6| v162320==-5
label values cop_treatmnt vallab113
codebook cop_treatmnt



codebook v162321

///this is the same as what I described above///



codebook v162322
gen wh_influence=v162322
label variable wh_influence "How much influence do whites have in US politics"
replace wh_influence=. if v162322==-9| v162322==-7| v162322==-6| v162322==-5
replace wh_influence=1 if v162322==3
replace wh_influence=3 if v162322==1
label define vallab114 1 "Too little influence" 2 "Just about the right amount of influence" 3 "Too much influence"
label values wh_influence vallab114
codebook wh_influence


codebook v162323
gen blk_influence=v162323
label variable blk_influence "How much influence to blacks have in US politics"
replace blk_influence=1 if v162323==3
replace blk_influence=3 if v162323==1
replace blk_influence=. if v162323==-9| v162323==-7| v162323==-6| v162323==-5
label values blk_influence vallab114
codebook blk_influence



codebook v162324
gen hsp_influence=v162324
label variable hsp_influence "How much influence do Hispanics have in US politics"
replace hsp_influence=. if v162324==-9| v162324==-7| v162324==-6| v162324==-5
replace hsp_influence=1 if v162324==3
replace hsp_influence=3 if v162324==1
label values hsp_influence vallab114
codebook hsp_influence





codebook v162325
gen asam_influence=v162325
label variable asam_influence "How much influence do Asian-Americans have in US politics"
replace asam_influence=. if v162325==-9| v162325==-7| v162325==-6| v162325==-5
replace asam_influence=1 if v162325==3
replace asam_influence=3 if v162325==1
label values asam_influence vallab114
codebook asam_influence

codebook v162326
tabulate v162326
gen hsp_identity=v162326
label variable hsp_identity "How important is being Hispanic to identity"
replace hsp_identity=. if v162326==-9| v162326==-6| v162326==-7| v162326==-5| v162326==-1
replace hsp_identity=1 if v162326==5
replace hsp_identity=2 if v162326==4
replace hsp_identity=4 if v162326==2
replace hsp_identity=5 if v162326==1
label values hsp_identity vallab111
codebook hsp_identity



codebook v162327
tabulate v162327
gen wh_identity=v162327
label variable wh_identity "How important is being white to identity"
replace wh_identity=. if v162327==-9| v162327==-7| v162327==-6| v162327==-5| v162327==-1
replace wh_identity=5 if v162327==1
replace wh_identity=4 if v162327==2
replace wh_identity=2 if v162327==4
replace wh_identity=1 if v162327==5
label values wh_identity vallab111
codebook wh_identity


codebook v162328
tabulate v162328
gen blk_identity=v162328
label variable blk_identity "How important is being black to identity"
replace blk_identity=. if v162328==-9| v162328==-7| v162328==-6| v162328==-5| v162328==-1
replace blk_identity=1 if v162328==5
replace blk_identity=2 if v162328==4
replace blk_identity=4 if v162328==2
replace blk_identity=5 if v162328==1
label values blk_identity vallab111
codebook blk_identity



codebook v162329
gen natam_identity=v162329
label variable natam_identity "How important is being Native American to identity"
replace natam_identity=. if v162329==-9| v162329==-8| v162329==-7| v162329==-6| v162329==-5| v162329==-1
replace natam_identity=1 if v162329==5
replace natam_identity=2 if v162329==4
replace natam_identity=4 if v162329==2
replace natam_identity=5 if v162329==1
label values natam_identity vallab111
codebook natam_identity


codebook v162330
gen asn_identity=v162330
label variable asn_identity "How important is being Asian to identity"
replace asn_identity=1 if v162330==5
replace asn_identity=2 if v162330==4
replace asn_identity=4 if v162330==2
replace asn_identity=5 if v162330==1
replace asn_identity=. if v162330==-7| v162330==-6| v162330==-5| v162330==-1
label values asn_identity vallab111
codebook asn_identity


codebook v162331
gen pacis_identity=v162331
label variable pacis_identity "How important is being Pacific Islander to identity"
replace pacis_identity=. if v162331==-7| v162331==-6| v162331==-5| v162331==-1
replace pacis_identity=1 if v162331==5
replace pacis_identity=2 if v162331==4
replace pacis_identity=4 if v162331==2
replace pacis_identity=5 if v162331==1
label values pacis_identity vallab111
codebook pacis_identity


codebook v162343
gen temper=v162343
label variable temper "How hard is it for R to control temper"
replace temper=. if v162343==-9| v162343==-7| v162343==-6| v162343==-5
replace temper=1 if v162343==5
replace temper=2 if v162343==4
replace temper=4 if v162343==2
replace temper=5 if v162343==1
label define vallab115 1 "Not hard at all" 2 "A little bit hard" 3 "Moderately hard" 4 "Very hard" 5 "Extremely hard"
label values temper vallab115
codebook temper

////I'm skeptical of the accuracy of self-assessments on this question. The vast majority are in the 1 and 2 category, and categories 4 and 5 each have less than a hundred///

codebook v162344
gen hit=v162344
label variable hit "When provoked, how likely for R to hit someone"
replace hit=. if v162344==-9| v162344==-7| v162344==-6| v162344==-5
replace hit=1 if v162344==5
replace hit=2 if v162344==4
replace hit=4 if v162344==2
replace hit=5 if v162344==1
label define vallab116 1 "Not very likely" 2 "Slightly likely" 3 "Moderately likely" 4 "Very likely" 5 "Extremely likely"
label values hit vallab116
codebook hit


codebook v162345
tabulate v162345
gen wh_hardwork=v162345
label variable wh_hardwork "Stereotype: whites hard-working"
replace wh_hardwork=. if v162345==-9| v162345==-7| v162345==-6| v162345==-5
replace wh_hardwork=1 if v162345==7
replace wh_hardwork=2 if v162345==6
replace wh_hardwork=3 if v162345==5
replace wh_hardwork=5 if v162345==3
replace wh_hardwork=6 if v162345==2
replace wh_hardwork=7 if v162345==1
label define vallab117 1 "Lazy" 7 "Hard-working"
label values wh_hardwork vallab117
codebook wh_hardwork



codebook v162346
gen blk_hardwork= v162346
label variable blk_hardwork "Stereotype: Blacks hard-working"
replace blk_hardwork=. if v162346==-9| v162346==-7| v162346==-6| v162346==-5
replace blk_hardwork=1 if v162346==7
replace blk_hardwork=2 if v162346==6
replace blk_hardwork=3 if v162346==5
replace blk_hardwork=5 if v162346==3
replace blk_hardwork=6 if v162346==2
replace blk_hardwork=7 if v162346==1
label values blk_hardwork vallab117
codebook blk_hardwork


codebook v162347
gen hsp_hardwork=v162347
label variable hsp_hardwork "Stereotype: Hispanics hard-working"
replace hsp_hardwork=. if v162347==-9| v162347==-7| v162347==-6| v162347==-5
replace hsp_hardwork=1 if v162347==7
replace hsp_hardwork=2 if v162347==6
replace hsp_hardwork=3 if v162347==5
replace hsp_hardwork=5 if v162347==3
replace hsp_hardwork=6 if v162347==2
replace hsp_hardwork=7 if v162347==1
label values hsp_hardwork vallab117
codebook hsp_hardwork



codebook v162348
gen asn_hardwork=v162348
label variable asn_hardwork "Stereotype: Asians hard-working"
replace asn_hardwork=. if v162348==-9| v162348==-7| v162348==-6| v162348==-5
replace asn_hardwork=1 if v162348==7
replace asn_hardwork=2 if v162348==6
replace asn_hardwork=3 if v162348==5
replace asn_hardwork=5 if v162348==3
replace asn_hardwork=6 if v162348==2
replace asn_hardwork=7 if v162348==1
label values asn_hardwork vallab117
codebook asn_hardwork


codebook v162349
gen wh_violent=v162349
tabulate v162349
label variable wh_violent "Stereotype: whites violent"
replace wh_violent=. if v162349==-9| v162349==-7| v162349==-6| v162349==-5
label define vallab118 1 "Peaceful" 7 "Violent"
label values wh_violent vallab118
codebook wh_violent


codebook v162350
gen blk_violent= v162350
label variable blk_violent "Stereotype: Blacks violent"
replace blk_violent=. if v162350==-9| v162350==-7| v162350==-6| v162350==-5
label values blk_violent vallab118
codebook blk_violent




codebook v162351
gen hsp_violent= v162351
label variable hsp_violent "Stereotype: Hispanics violent"
replace hsp_violent=. if v162351==-9| v162351==-7| v162351==-6| v162351==-5
label values hsp_violent vallab118
codebook hsp_violent


codebook v162352
gen asn_violent= v162352
label variable asn_violent "Stereotype: Asians violent"
replace asn_violent=. if v162352==-9| v162352==-7| v162352==-6| v162352==-5
label values asn_violent vallab118
codebook asn_violent



codebook v162353
gen mslm_violent=v162353
label variable mslm_violent "Stereotype: Muslims violent"
replace mslm_violent=. if v162353==-9| v162353==-7| v162353==-6| v162353==-5
label values mslm_violent vallab118
codebook mslm_violent



codebook v162354
gen chr_violent=v162354
label variable chr_violent "Stereotype: Christians violent"
replace chr_violent=. if v162354==-9| v162354==-7| v162354==-6| v162354==-5
label values chr_violent vallab118
codebook chr_violent


codebook v162355
tabulate v162355
gen mslm_patriot=v162355
label variable mslm_patriot "Stereotype: Muslims patriotic"
replace mslm_patriot=. if v162355==-9| v162355==-6| v162355==-7| v162355==-5
replace mslm_patriot=1 if v162355==7
replace mslm_patriot=2 if v162355==6
replace mslm_patriot=3 if v162355==5
replace mslm_patriot=5 if v162355==3
replace mslm_patriot=6 if v162355==2
replace mslm_patriot=7 if v162355==1
label define vallab119 1 "Unpatriotic" 7 "Patriotic"
label values mslm_patriot vallab119
codebook mslm_patriot





codebook v162356
tabulate v162356
gen chr_patriot=v162356
label variable chr_patriot "Stereotype: Christians patriotic"
replace chr_patriot=. if v162356==-9| v162356==-7| v162356==-6| v162356==-5
replace chr_patriot=1 if v162356==7
replace chr_patriot=2 if v162356==6
replace chr_patriot=3 if v162356==5
replace chr_patriot=5 if v162356==3
replace chr_patriot=6 if v162356==2
replace chr_patriot=7 if v162356==1
label values chr_patriot vallab119
codebook chr_patriot


codebook v162357
gen blk_discrim=v162357
label variable blk_discrim "Discrimination in the US against Blacks"
replace blk_discrim=. if v162357==-9| v162357==-7| v162357==-6| v162357==-5
replace blk_discrim=1 if v162357==5
replace blk_discrim=2 if v162357==4
replace blk_discrim=4 if v162357==2
replace blk_discrim=5 if v162357==1
label define vallab120 1 "None at all" 2 "A little" 3 "A moderate amount" 4 "A lot" 5 "A great deal"
label values blk_discrim vallab120
codebook blk_discrim


codebook v162358
gen hsp_discrim=v162358
label variable hsp_discrim "Discrimination in the US against Hispanics"
replace hsp_discrim=. if v162358==-9| v162358==-7| v162358==-6| v162358==-5
replace hsp_discrim=1 if v162358==5
replace hsp_discrim=2 if v162358==4
replace hsp_discrim=4 if v162358==2
replace hsp_discrim=5 if v162358==1
label values hsp_discrim vallab120
codebook hsp_discrim



codebook v162359
gen as_discrim=v162359
label variable as_discrim "Discrimination in the US against Asian Americans"
replace as_discrim=. if v162359==-9| v162359==-7| v162359==-6| v162359==-5
replace as_discrim=1 if v162359==5
replace as_discrim=2 if v162359==4
replace as_discrim=4 if v162359==2
replace as_discrim=5 if v162359==1
label values as_discrim vallab120
codebook as_discrim


codebook v162360
gen wh_discrim=v162360
label variable wh_discrim "Discrimination in the US against whites"
replace wh_discrim=1 if v162360==5
replace wh_discrim=2 if v162360==4
replace wh_discrim=4 if v162360==2
replace wh_discrim=5 if v162360==1
replace wh_discrim=. if v162360==-9| v162360==-7| v162360==-6| v162360==-5
label values wh_discrim vallab120
codebook wh_discrim



codebook v162361
gen gl_discrim=v162361
label variable gl_discrim "Discrimination in the US against gays and lesbians"
replace gl_discrim=. if v162361==-9| v162361==-7| v162361==-6| v162361==-5
replace gl_discrim=1 if v162361==5
replace gl_discrim=2 if v162361==4
replace gl_discrim=4 if v162361==2
replace gl_discrim=5 if v162361==1
label values gl_discrim vallab120
codebook gl_discrim


codebook v162362
gen f_discrim=v162362
label variable f_discrim "Discrimination in the US against Women"
replace f_discrim=. if v162362==-9| v162362==-7| v162362==-6| v162362==-5
replace f_discrim=1 if v162362==5
replace f_discrim=2 if v162362==4
replace f_discrim=4 if v162362==2
replace f_discrim=5 if v162362==1
label values f_discrim vallab120
codebook f_discrim


codebook v162363
gen m_discrim=v162363
label variable m_discrim "Discrimination in the US against men"
replace m_discrim=. if v162363==-9| v162363==-7| v162363==-6| v162363==-5
replace m_discrim=1 if v162363==5
replace m_discrim=2 if v162363==4
replace m_discrim=4 if v162363==2
replace m_discrim=5 if v162363==1
label values m_discrim vallab120
codebook m_discrim


codebook v162364
gen mslm_discrim=v162364
label variable mslm_discrim "Discrimination in the US against Muslims"
replace mslm_discrim=. if v162364==-9| v162364==-7| v162364==-6| v162364==-5
replace mslm_discrim=1 if v162364==5
replace mslm_discrim=2 if v162364==4
replace mslm_discrim=4 if v162364==2
replace mslm_discrim=5 if v162364==1
label values mslm_discrim vallab120
codebook mslm_discrim


codebook v162365
gen chr_discrim=v162365
label variable chr_discrim "Discrimination in the US against Christians"
replace chr_discrim=. if v162365==-9| v162365==-7| v162365==-6| v162365==-5
replace chr_discrim=1 if v162365==5
replace chr_discrim=2 if v162365==4
replace chr_discrim=4 if v162365==2
replace chr_discrim=5 if v162365==1
label values chr_discrim vallab120
codebook chr_discrim

codebook v162366
gen trans_discrim=v162366
label variable trans_discrim "Discrimination in the US against transgenders"
replace trans_discrim=1 if v162366==5
replace trans_discrim=2 if v162366==4
replace trans_discrim=4 if v162366==2
replace trans_discrim=5 if v162366==1
replace trans_discrim=. if v162366==-9| v162366==-7| v162366==-6| v162366==-5
label values trans_discrim vallab120
codebook trans_discrim


codebook v162367
tabulate v162367
gen faced_discrim=v162367
label variable faced_discrim "How much discrimination has R faced personally"
replace faced_discrim=. if v162367==-9|v162367==-7| v162367==-6| v162367==-5
replace faced_discrim=1 if v162367==5
replace faced_discrim=2 if v162367==4
replace faced_discrim=4 if v162367==2
replace faced_discrim=5 if v162367==1
label variable faced_discrim vallab120
codebook faced_discrim


codebook v162368
tabulate v162368
gen skin_tone=v162368
label variable skin_tone "Scale of 1-10"
replace skin_tone=. if v162368==-9| v162368==-7| v162368==-6| v162368==-5
codebook skin_tone

codebook v162369
gen skin_discrim= v162369
label variable skin_discrim "Discrimination due to skin tone"
replace skin_discrim=. if v162369==-9| v162369==-7| v162369==-6| v162369==-5
replace skin_discrim=1 if v162369==5
replace skin_discrim=2 if v162369==4
replace skin_discrim=4 if v162369==2
replace skin_discrim=5 if v162369==1
label values skin_discrim vallab120
codebook skin_discrim



codebook v162370
gen fbook=v162370
label variable fbook "Facebook account used recently"
replace fbook=. if v162370==-9| v162370==-7| v162370==-6|v162370==-5
label define vallab121 1 "Yes, have used Facebook acct in the past month" 2 "Have a Facebook acct but haven't used it in past month" 3 "No, do not have a Facebook account"
label values fbook vallab121
codebook fbook

gen fbook_d=v162370
label variable fbook_d "Facebook acct dummy"
replace fbook_d=. if v162370==-9| v162370==-7| v162370==-6| v162370==-5
replace fbook_d=1 if v162370==2
replace fbook_d=0 if v162370==3
label define vallab122 0 "Does not have a Facebook acct" 1 "Has a Facebook acct"
label values fbook_d vallab122
codebook fbook_d


tab v162034a
gen votetrump=0
replace votetrump=1 if v162034a==2
gen voteclinton=0
replace voteclinton=1 if v162034a==1

gen male=0
replace male=1 if v161002==1

rename ideo_7 ideology
rename party_id partyid

rename econ_selfpercep econcondition


gen whitepos=.
gen blackpos=.
gen latinopos=.
gen asampos=.

rename blk_discrim black_discrim
rename wh_discrim white_discrim
rename as_discrim asam_discrim
rename hsp_discrim latino_discrim
 
gen latino=0
replace latino=1 if hispanic==1

**hmmm***
replace whitepos=0 if white==1
replace whitepos=(whitepos+1) if white_discrim>black_discrim
replace whitepos=(whitepos+1) if white_discrim>latino_discrim
replace whitepos=(whitepos+1) if white_discrim>asam_discrim
replace whitepos=(whitepos-1) if white_discrim<black_discrim
replace whitepos=(whitepos-1) if white_discrim<latino_discrim
replace whitepos=(whitepos-1) if white_discrim<asam_discrim
replace whitepos=whitepos+4
tab whitepos


replace blackpos=0 if black==1
replace blackpos=(blackpos+1) if black_discrim>white_discrim
replace blackpos=(blackpos+1) if black_discrim>latino_discrim
replace blackpos=(blackpos+1) if black_discrim>asam_discrim
replace blackpos=(blackpos-1) if black_discrim<white_discrim
replace blackpos=(blackpos-1) if black_discrim<latino_discrim
replace blackpos=(blackpos-1) if black_discrim<asam_discrim
replace blackpos=blackpos+4

tab blackpos


replace latinopos=0 if latino==1
replace latinopos=(latinopos+1) if latino_discrim>white_discrim
replace latinopos=(latinopos+1) if latino_discrim>black_discrim
replace latinopos=(latinopos+1) if latino_discrim>asam_discrim
replace latinopos=(latinopos-1) if latino_discrim<white_discrim
replace latinopos=(latinopos-1) if latino_discrim<black_discrim
replace latinopos=(latinopos-1) if latino_discrim<asam_discrim
replace latinopos=latinopos+4

tab asampos

replace asampos=0 if asian==1
replace asampos=(asampos+1) if asam_discrim>white_discrim
replace asampos=(asampos+1) if asam_discrim>black_discrim
replace asampos=(asampos+1) if asam_discrim>latino_discrim
replace asampos=(asampos-1) if asam_discrim<white_discrim
replace asampos=(asampos-1) if asam_discrim<black_discrim
replace asampos=(asampos-1) if asam_discrim<latino_discrim
replace asampos=asampos+4


tab asampos

label define positionalitylabel -3 "More Discrim" 0 "Same As All Groups" 3 "Less Discrim"


gen positionality=.
replace positionality=blackpos if black==1
replace positionality=latinopos if latino==1
replace positionality=whitepos if white==1
replace positionality=asampos if asian==1
label values positionality positionalitylabel

gen under27=.
replace under27=1 if age < 27
replace under27=0 if age>=27

tab v162215
tab v162216
tab v162217
tab v162218

gen efficacy=0
replace efficacy=efficacy+5 if v162215==5
replace efficacy=efficacy+4 if v162215==4
replace efficacy=efficacy+3 if v162215==3
replace efficacy=efficacy+2 if v162215==2
replace efficacy=efficacy+1 if v162215==1
replace efficacy=efficacy+5 if v162216==5
replace efficacy=efficacy+4 if v162216==4
replace efficacy=efficacy+3 if v162216==3
replace efficacy=efficacy+2 if v162216==2
replace efficacy=efficacy+1 if v162216==1
replace efficacy=efficacy+5 if v162217==5
replace efficacy=efficacy+4 if v162217==4
replace efficacy=efficacy+3 if v162217==3
replace efficacy=efficacy+2 if v162217==2
replace efficacy=efficacy+1 if v162217==1
replace efficacy=efficacy+5 if v162218==1
replace efficacy=efficacy+4 if v162218==2
replace efficacy=efficacy+3 if v162218==3
replace efficacy=efficacy+2 if v162218==4
replace efficacy=efficacy+1 if v162218==5
replace efficacy=. if efficacy==0
tab efficacy

tab v161184
gen hcpubpriv=.
replace hcpubpriv=1 if v161184==7
replace hcpubpriv=2 if v161184==6
replace hcpubpriv=3 if v161184==5
replace hcpubpriv=4 if v161184==4
replace hcpubpriv=5 if v161184==3
replace hcpubpriv=6 if v161184==2
replace hcpubpriv=7 if v161184==1

gen sixtyfive=0
replace sixtyfive=1 if age>65

gen contacted=0
replace contacted=1 if v162007==1


gen rr=0
replace rr=rr+1 if v162211==5
replace rr=rr+2 if v162211==4
replace rr=rr+3 if v162211==3
replace rr=rr+4 if v162211==2
replace rr=rr+5 if v162211==1
replace rr=rr+1 if v162212==1
replace rr=rr+2 if v162212==2
replace rr=rr+3 if v162212==3
replace rr=rr+4 if v162212==4
replace rr=rr+5 if v162212==5
replace rr=rr+1 if v162213==1
replace rr=rr+2 if v162213==2
replace rr=rr+3 if v162213==3
replace rr=rr+4 if v162213==4
replace rr=rr+5 if v162213==5
replace rr=rr+1 if v162214==5
replace rr=rr+2 if v162214==4
replace rr=rr+3 if v162214==3
replace rr=rr+4 if v162214==2
replace rr=rr+5 if v162214==1

*what to do with missingness*
replace rr=(rr/20)


tab v161187
gen guncontrol=.
replace guncontrol=3 if v161187==1
replace guncontrol=1 if v161187==2
replace guncontrol=2 if v161187==3

gen voted=0
replace voted=. if voted_b==-2
replace voted=1 if voted_b==1

gen registeredsum=0
replace registeredsum=1 if reg_vote==1 | register==1

gen eb_talk =0
replace eb_talk= 1 if v162010==1

gen eb_protest=0
replace eb_protest= 1 if v162011==1

gen eb_campaignlit=0
replace eb_campaignlit= 1 if v162012==1

gen eb_campaignwork=0
replace eb_campaignwork= 1 if v162013==1

gen eb_moneycand=0
replace eb_moneycand= 1 if v162014==1

gen eb_moneyparty=0
replace eb_moneyparty= 1 if v162016==1

gen eb_contactr=0
replace eb_contactr= 1 if v162019==1

gen polpartindex=(eb_talk + eb_protest + eb_campaignlit + eb_campaignwork + eb_moneycand + eb_moneyparty + eb_contactr + registeredsum + voted)/9

gen reldep = (whitepos-1)/6

gen interaction = rr*reldep

gen female=0
replace female=1 if v161342==2

gen resimobi = current_address

gen ownhome = home_owner

gen church_attoft = church_att
replace church_attoft = 0 if church_att==.

gen strpty = abs(partyid-4)
replace strpty = . if partyid==.

gen eb_index7 = polpartindex

gen ce_index=0
replace ce_index=ce_index+1 if v162195==1
replace ce_index=ce_index+1 if v162196==1
replace ce_index=ce_index+1 if v162197==1
replace ce_index=ce_index+1 if v162198==1
replace ce_index=ce_index+1 if v162200==1
replace ce_index=ce_index+1 if v162202==1
replace ce_index=ce_index+1 if v162204==1
replace ce_index=ce_index/7

gen v162195_R = 0
gen v162196_R = 0
gen v162197_R = 0
gen v162198_R = 0
gen v162200_R = 0
gen v162202_R = 0
gen v162204_R = 0

replace v162195_R=1 if v162195==1
replace v162196_R=1 if v162196==1
replace v162197_R=1 if v162197==1
replace v162198_R=1 if v162198==1
replace v162200_R=1 if v162200==1
replace v162202_R=1 if v162202==1
replace v162204_R=1 if v162204==1


gen whiteconsciousness=.
replace whiteconsciousness = (wh_worktgthr + wh_jobs)/2

gen bwftdiff =  ftherm_whites - ftherm_blacks

gen rr_favors =.
replace rr_favors = 1 if v162211==5
replace rr_favors = 2 if v162211==4
replace rr_favors = 3 if v162211==3
replace rr_favors = 4 if v162211==2
replace rr_favors = 5 if v162211==1

gen rr_slavery =.
replace rr_slavery = 1 if v162212==1
replace rr_slavery = 2 if v162212==2
replace rr_slavery = 3 if v162212==3
replace rr_slavery = 4 if v162212==4
replace rr_slavery = 5 if v162212==5

gen rr_deserve =.
replace rr_deserve = 1 if v162213==1
replace rr_deserve = 2 if v162213==2
replace rr_deserve = 3 if v162213==3
replace rr_deserve = 4 if v162213==4
replace rr_deserve = 5 if v162213==5

gen rr_try =.
replace rr_try = 1 if v162214==5
replace rr_try = 2 if v162214==4
replace rr_try = 3 if v162214==3
replace rr_try = 4 if v162214==2
replace rr_try = 5 if v162214==1

codebook v161264x
gen religionsum=.
replace religionsum = 1  if v161265x==2
replace religionsum = 2  if v161265x==1 
replace religionsum = 3  if v161265x==3 
replace religionsum = 4 if v161265x==4 
replace religionsum = 6  if v161264x==720 
replace religionsum = 7  if v161264x==721 
replace religionsum = 8  if v161264x==722 
replace religionsum = 9  if v161265x==6 
replace religionsum = 10 if v161264x==880
replace religionsum = 11  if v161266m==1 | v161266k==1 
replace religionsum = 5  if v161265x==5 

gen blackstereotypes = .

tab v162350
tab v162346

replace blackstereotypes = v162350 if v162350>0
replace blackstereotypes = blackstereotypes+v162346 if v162346>0




replace blackstereotypes = blackstereotypes/14
tab blackstereotypes

tab v162096

gen feministft=.
replace feministft=v162096 if v162096>=0 & v162096<995


tab v162232
gen wequalitySF =.
replace wequalitySF=5 if v162232==1
replace wequalitySF=4 if v162232==2
replace wequalitySF=3 if v162232==3
replace wequalitySF=2 if v162232==4
replace wequalitySF=1 if v162232==5


tab v162233

gen wequalityMP =.

replace wequalityMP=5 if v162233==1
replace wequalityMP=4 if v162233==2
replace wequalityMP=3 if v162233==3
replace wequalityMP=2 if v162233==4
replace wequalityMP=1 if v162233==5

gen wequality = (wequalityMP + wequalitySF)/10

save "ANES2016Rec.dta", replace /// REPLACE WITH PATH TO RECODED 2016 ANES



************************************************************************************************************
* 2020 * 2020 * 2020 * 2020 * 2020 * 2020 * 2020 * 2020 * 2020 * 2020 * 2020 * 2020 * 2020 * 2020 * 2020 * 2020 
************************************************************************************************************

///Pre Section///
use "anes_timeseries_2020.dta", clear /// REPLACE WITH PATH TO RAW 2020 ANES

set more off

codebook V201001
gen spk_eng = V201001
label variable spk_eng "Do You Speak/Prefer English dummy (pre)"
replace spk_eng=0 if V201001==2
label define vallab1 0 "No" 1 "Yes"
label values spk_eng vallab1
codebook V201001
codebook spk_eng

gen spk_spn = V201001
label variable spk_spn "Do You Speak/Prefer Spanish dummy (pre)"
replace spk_spn=0 if V201001==1
replace spk_spn=1 if V201001==2
label values spk_spn vallab1
codebook V201001
codebook spk_spn

codebook V201002a
///This question was about whether the participant had their participant booklet for their interview, so I wasn't sure what needed to be coded here.///
codebook V201002b
///Same uncertainty as for V201002a///
codebook V201003
///Concerned audio consent, so I'm not sure this needed to be recoded///

codebook V201004
gen male_int = V201004
label variable male_int "Do You Identify as Male dummy (interview only) (pre)"
replace male_int=0 if V201004==2
replace male_int=. if V201004==-1 | V201004==-4
label values male_int vallab1
codebook V201004
codebook male_int

gen female_int = V201004
label variable female_int "Do You Identify as Female dummy (interview only) (pre)"
replace female_int=0 if V201004==1
replace female_int=1 if V201004==2
replace female_int=. if V201004==-1 | V201004==-4
label values female vallab1
codebook V201004
codebook female_int

codebook V201005
gen pay_attn = V201005
label variable pay_attn "How often does R pay attention to politics (pre)"
replace pay_attn=1 if V201005==5
replace pay_attn=2 if V201005==4
replace pay_attn=3 if V201005==3
replace pay_attn=4 if V201005==2
replace pay_attn=5 if V201005==1
replace pay_attn=. if V201005==-9
label define vallab2 1 "Never" 2 "Some of the time" 3 "About half the time" 4 "Most of the time" 5 "Always"
label values pay_attn vallab2
codebook V201005
codebook pay_attn

codebook V201006
gen follow_campaign = V201006
label variable follow_campaign "Interest in following campaigns (pre)"
replace follow_campaign=1 if V201006==3
replace follow_campaign=3 if V201006==1
replace follow_campaign=. if V201006==-9
label define vallab3 1 "Not much interested" 2 "Somewhat interested" 3 "Very much interested"
label values follow_campaign vallab3
codebook V201006
codebook follow_campaign

///V201007a-V201007f all -2///

codebook V201008
gen reg_vote = V201008
label variable reg_vote "Is R registered to vote dummy (pre)"
replace reg_vote=. if V201008==-9 | V201008==-8 | V201008==-1
replace reg_vote=1 if V201008==1 | V201008==2
replace reg_vote=0 if V201008==3
label values reg_vote vallab1
codebook V201008
codebook reg_vote

///All but one response was inapplicable for V201009 so I did not code this one///
///V201010-V201014e all -2///
///Uncertain what V201015 can be used for as the important part is expanded on earlier and most responses are inapplicable///
///V201015z all -3///

codebook V201016
gen time_registered = V201016
label variable time_registered "How long has R been registered at location (pre)"
replace time_registered=. if V201016==-9 | V201016==-1
label define vallab4 1 "0-1 years" 2 "2-5 years" 3 "More than five years"
label values time_registered vallab4
codebook V201016
codebook time_registered

///V201017 all -3///

codebook V201018
///I think it should be noted that about half (4021) of the results from the raw data were inapplicable)///
gen party_reg = V201018
label variable party_reg "Party of registration (pre)"
replace party_reg=. if V201018==-9 | V201018==-8 | V201018==-1
replace party_reg=3 if V201018==4 | V201018==5
label define vallab5 1 "Democratic Party" 2 "Republican Party" 3 "Independent/None/Other"
label values party_reg vallab5
codebook V201018
codebook party_reg

gen reg_dem = V201018
label variable reg_dem "Registered Democrat dummy (pre)"
replace reg_dem=0 if V201018==2 | V201018==4 | V201018==5
replace reg_dem=. if V201018==-9 | V201018==-8 | V201018==-1
label values reg_dem vallab1
codebook V201018
codebook reg_dem

gen reg_rep = V201018
label variable reg_rep "Registered Republican dummy (pre)"
replace reg_rep=1 if V201018==2
replace reg_rep=0 if V201018==1 | V201018==4 | V201018==5
replace reg_rep=. if V201018==-9 | V201018==-8 | V201018==-1
label values reg_rep vallab1
codebook V201018
codebook reg_rep

///V201018z all -3///

codebook V201019
gen reg_intent = V201019
label variable reg_intent "Does R intend to register to vote dummy (pre)"
replace reg_intent=. if V201019==-9 | V201019==-8 | V201019==-1
replace reg_intent=0 if V201019==2
label values reg_intent vallab1
codebook V201019
codebook reg_intent

codebook V201020
gen vote_primary = V201020
label variable vote_primary "Did R vote in a Presidential primary/caucus dummy (pre)"
replace vote_primary=. if V201020==-9 | V201020==-8
replace vote_primary=0 if V201020==2
label values vote_primary vallab1
codebook V201020
codebook vote_primary

codebook V201021
gen primary_vote = V201021
label variable primary_vote "Which Candidate did R vote for in the primary (pre)"
replace primary_vote=. if V201021==-9 | V201021==-8 | V201021==-1
label define vallab6 1 "Joe Biden" 2 "Michael Bloomberg" 3 "Pete Buttigieg" 4 "Amy Klobuchar" 5 "Bernie Sanders" 6 "Elizabeth Warren" 7 "Another Democrat" 8 "Donald Trump" 9 "Another Repubilcan" 10 "Someone else who is not a Republican"
label values primary_vote vallab6
codebook V201021
codebook primary_vote
gen biden_primary = V201021
label variable biden_primary "R voted for Joe Biden in primary dummy (pre)"
replace biden_primary=. if inrange(V201021, -9, -1)
replace biden_primary=0 if inrange(V201021, 2, 10)
label values biden_primary vallab1
codebook V201021
codebook biden_primary

gen bloomberg_primary = V201021
label variable bloomberg_primary "R voted for Michael Bloomberg in primary dummy (pre)"
replace bloomberg_primary=. if inrange(V201021, -9, -1)
replace bloomberg_primary=0 if V201021==1 | inrange(V201021, 3, 10)
replace bloomberg_primary=1 if V201021==2
label values bloomberg_primary vallab1
codebook V201021
codebook bloomberg_primary

gen buttigieg_primary = V201021
label variable buttigieg_primary "R voted for Pete Buttigieg in primary dummy (pre)"
replace buttigieg_primary=. if inrange(V201021, -9, -1)
replace buttigieg_primary=0 if V201021==1 | V201021==2 | inrange(V201021, 4, 10)
replace buttigieg_primary=1 if V201021==3
label values buttigieg_primary vallab1
codebook V201021
codebook buttigieg_primary

gen klobuchar_primary = V201021
label variable klobuchar_primary "R voted for Amy Klobuchar in primary dummy (pre)"
replace klobuchar_primary=. if inrange(V201021, -9, -1)
replace klobuchar_primary=0 if inrange(V201021, 1, 3) | inrange(V201021, 5, 10)
replace klobuchar_primary=1 if V201021==4
label values klobuchar_primary vallab1
codebook V201021
codebook klobuchar_primary

gen bernie_primary = V201021
label variable bernie_primary "R voted for Bernie Sanders in primary dummy (pre)"
replace bernie_primary=. if inrange(V201021, -9, -1)
replace bernie_primary=0 if inrange(V201021, 1, 4) | inrange(V201021, 6, 10)
replace bernie_primary=1 if V201021==5
label values bernie_primary vallab1
codebook V201021
codebook bernie_primary

gen warren_primary = V201021
label variable warren_primary "R voted for Elizabeth Warren in primary dummy (pre)"
replace warren_primary=. if inrange(V201021, -9, -1)
replace warren_primary=0 if inrange(V201021, 1, 5) | inrange(V201021, 7, 10)
replace warren_primary=1 if V201021==6
label values warren_primary vallab1
tab V201021
codebook warren_primary

gen diff_dem_primary = V201021
label variable diff_dem_primary "R voted for another democrat in primary dummy (pre)"
replace diff_dem_primary=. if inrange(V201021, -9, -1)
replace diff_dem_primary=0 if inrange(V201021, 1, 6) | inrange(V201021, 8, 10)
replace diff_dem_primary=1 if V201021==7
label values diff_dem_primary vallab1
tab V201021
codebook diff_dem_primary

gen trump_primary = V201021
label variable trump_primary "R voted for Donald Trump in primary dummy (pre)"
replace trump_primary=. if inrange(V201021, -9, -1)
replace trump_primary=0 if inrange(V201021, 1, 7) | V201021==9 | V201021==10
replace trump_primary=1 if V201021==8
label values trump_primary vallab1
tab V201021
codebook trump_primary

gen diff_rep_primary = V201021
label variable diff_rep_primary "R voted for another republican in primary dummy (pre)"
replace diff_rep_primary=. if inrange(V201021, -9, -1)
replace diff_rep_primary=0 if inrange(V201021, 1, 8) | V201021==10
replace diff_rep_primary=1 if V201021==9
label values diff_rep_primary vallab1
tab V201021
codebook diff_rep_primary

gen other_primary_vote = V201021
label variable other_primary_vote "R voted for someone who is not a Republican nor a Democrat in primary dummy (pre)"
replace other_primary_vote=. if inrange(V201021, -9, -1)
replace other_primary_vote=0 if inrange(V201021, 1, 9)
replace other_primary_vote=1 if V201021==10
label values other_primary_vote vallab1
tab V201021
codebook other_primary_vote

codebook V201022
gen already_voted = V201022
label variable already_voted "Already voted in General Election dummy (pre)"
replace already_voted=. if V201022==-9
replace already_voted=0 if V201022==2
label values already_voted vallab1
codebook V201022
codebook already_voted

codebook V201023
gen vote_early = V201023
label variable vote_early "Confirmation voted early in General Election dummy (pre)"
replace vote_early=. if V201023==-9 | V201023==-1
replace vote_early=0 if V201023==2
label values vote_early vallab1
codebook V201023
codebook vote_early

codebook V201024
gen vote_manner = V201024
label variable vote_manner "In what manner did R vote (pre)"
replace vote_manner=. if V201024==-9 | V201024==-1
label define vallab7 1 "Polling Place" 2 "Mail" 3 "Other" 4 "Not completely sure if R voted"
label values vote_manner vallab7
codebook V201024
codebook vote_manner

gen vote_early_polling = V201024
label variable vote_early_polling "R Definitely voted in person at a polling place before election day dummy (pre)"
replace vote_early_polling=. if V201024==-9 | V201024==-1
replace vote_early_polling=0 if inrange(V201024, 2, 4)
label values vote_early_polling vallab1
codebook V201024
codebook vote_early_polling

gen vote_early_mail = V201024
label variable vote_early_mail "R Definitely voted by mailing a ballot to elections officials before election dummy (pre)"
replace vote_early_mail=. if V201024==-9 | V201024==-1
replace vote_early_mail=0 if V201024==1 | V201024==3 | V201024==4
replace vote_early_mail=1 if V201024==2
label values vote_early_mail vallab1
codebook V201024
codebook vote_early_mail

gen vote_early_other = V201024
label variable vote_early_other "R Definitely voted in some other way dummy (pre)"
replace vote_early_other=. if V201024==-9 | V201024==-1
replace vote_early_other=0 if V201024==1 | V201024==2 | V201024==4
replace vote_early_other=1 if V201024==3
label values vote_early_other vallab1
codebook V201024
codebook vote_early_other

gen vote_early_unsure = V201024
label variable vote_early_unsure "R not completely sure whether voted or not dummy (pre)"
replace vote_early_unsure=. if V201024==-9 | V201024==-1
replace vote_early_unsure=0 if inrange(V201024, 1, 3)
replace vote_early_unsure=1 if V201024==4
label values vote_early_unsure vallab1
codebook V201024
codebook vote_early_unsure

///V201025x all -2///
///Unsure how to code V201026///
///V201027x all -2///

codebook V201028
gen voted_pres = V201028
label variable voted_pres "Did R vote for President dummy (pre)"
replace voted_pres=. if V201028==-9 | V201028==-1
replace voted_pres=0 if V201028==2
label values voted_pres vallab1
codebook V201028
codebook voted_pres

codebook V201029
gen votechoice_pres = V201029
label variable votechoice_pres "For whom did R vote for President (pre)"
replace votechoice_pres=. if V201029==-9 | V201029==-1
label define vallab8 1 "Joe Biden" 2 "Donald Trump" 3 "Jo Jorgensen" 4 "Howie Hawkins" 5 "Other"
label values votechoice_pres vallab8
codebook V201029
codebook votechoice_pres

gen voted_biden = V201029
label variable voted_biden "R voted for Joe Biden for President dummy (pre)"
replace voted_biden=. if V201029==-9 | V201029==-1
replace voted_biden=0 if inrange(V201029, 2, 5)
label values voted_biden vallab1
codebook V201029
codebook voted_biden

gen voted_trump = V201029
label variable voted_trump "R voted for Donald Trump for President dummy (pre)"
replace voted_trump=. if V201029==-9 | V201029==-1
replace voted_trump=0 if V201029==1 | inrange(V201029, 3, 5)
replace voted_trump=1 if V201029==2
label values voted_trump vallab1
codebook V201029
codebook voted_trump

gen voted_jo = V201029
label variable voted_jo "R voted for Jo Jorgensen for President dummy (pre)"
replace voted_jo=. if V201029==-9 | V201029==-1
replace voted_jo=0 if V201029==1 | V201029==2 | V201029==4 | V201029==5
replace voted_jo=1 if V201029==3
label values voted_jo vallab1
codebook V201029
codebook voted_jo

gen voted_howie = V201029
label variable voted_howie "R voted for Howie Hawkins for President dummy (pre)"
replace voted_howie=. if V201029==-9 | V201029==-1
replace voted_howie=0 if inrange(V201029, 1, 3) | V201029==5
replace voted_howie=1 if V201029==4
label values voted_howie vallab1
codebook V201029
codebook voted_howie

gen voted_other = V201029
label variable voted_other "R voted for other candidate for preisdent dummy (pre)"
replace voted_other=. if V201029==-9 | V201029==-1
replace voted_other=0 if inrange(V201029, 1, 4)
replace voted_other=1 if V201029==5
label values voted_other vallab1
codebook V201029
codebook voted_other

///V201029z all -2///

codebook V201030
gen pref_strength = V201030
label variable pref_strength "Preference strong for pres cand for whom R voted dummy (pre)"
replace pref_strength=. if V201030==-1
replace pref_strength=0 if V201030==2
label values pref_strength vallab1
codebook V201030
codebook pref_strength

///V201031 and V201031y all -2///

codebook V201032
gen intend_vote = V201032
label variable intend_vote "Does R intend to vote for President dummy (pre)"
replace intend_vote=. if V201032==-9 | V201032==-8 | V201032==-1
replace intend_vote=0 if V201032==2
label values intend_vote vallab1
codebook V201032
codebook intend_vote

codebook V201033
gen vote_intent = V201033
label variable vote_intent "For whom does R intend to vote for President (pre)"
replace vote_intent=. if V201033==-9 | V201033==-8 | V201033==-1
label values vote_intent vallab8
codebook V201033
codebook vote_intent

gen intend_biden = V201033
label variable intend_biden "R intends to vote for Joe Biden for President dummy (pre)"
replace intend_biden=. if V201033==-9 | V201033==-1 | V201033==-8
replace intend_biden=0 if inrange(V201033, 2, 5)
label values intend_biden vallab1
codebook V201033
codebook intend_biden

gen intend_trump = V201033
label variable intend_trump "R intends to vote for Donald Trump for President dummy (pre)"
replace intend_trump=. if V201033==-9 | V201033==-1 | V201033==-8
replace intend_trump=0 if V201033==1 | inrange(V201033, 3, 5)
replace intend_trump=1 if V201033==2
label values intend_trump vallab1
codebook V201033
codebook intend_trump

gen intend_jo = V201033
label variable intend_jo "R intends to vote for Jo Jorgensen for President dummy (pre)"
replace intend_jo=. if V201033==-9 | V201033==-1 | V201033==-8
replace intend_jo=0 if V201033==1 | V201033==2 | V201033==4 | V201033==5
replace intend_jo=1 if V201033==3
label values intend_jo vallab1
codebook V201033
codebook intend_jo

gen intend_howie = V201033
label variable intend_howie "R intends to vote for Howie Hawkins for President dummy (pre)"
replace intend_howie=. if V201033==-9 | V201033==-1 | V201033==-8
replace intend_howie=0 if inrange(V201033, 1, 3) | V201033==5
replace intend_howie=1 if V201033==4
label values intend_howie vallab1
codebook V201033
codebook intend_howie

gen intend_other_cand = V201033
label variable intend_other_cand "R intends to vote for other candidate for preisdent dummy (pre)"
replace intend_other_cand=. if V201033==-9 | V201033==-1 | V201033==-8
replace intend_other_cand=0 if inrange(V201033, 1, 4)
replace intend_other_cand=1 if V201033==5
label values intend_other_cand vallab1
codebook V201033
codebook intend_other_cand

///V201033z all -2///

codebook V201034
gen intent_pref = V201034
label variable intent_pref "Preference strong for Presidential candidate for whom R intends to vote dummy (pre)"
replace intent_pref=. if V201034==-9 | V201034==-8 | V201034==-1
replace intent_pref=0 if V201034==2
label values intent_pref vallab1
codebook V201034
codebook intent_pref

codebook V201035
gen pres_pref = V201035
label variable pres_pref "Does R prefer Presidential Candidate (pre)"
replace pres_pref=. if V201035==-9 | V201035==-8 | V201035==-1
replace pres_pref=0 if V201035==2
label values pres_pref vallab1
codebook V201035
codebook pres_pref

codebook V201036
gen cand_pref = V201036
label variable cand_pref "Preference for Presidential Candidate (pre)"
replace cand_pref=. if V201036==-9 | V201036==-8 | V201036==-1
label values cand_pref vallab8
codebook V201036
codebook cand_pref

gen prefer_biden = V201036
label variable prefer_biden "R prefers Joe Biden for President dummy (pre)"
replace prefer_biden=. if V201036==-9 | V201036==-1
replace prefer_biden=0 if inrange(V201036, 2, 5)
label values prefer_biden vallab1
codebook V201036
codebook prefer_biden

gen prefer_trump = V201036
label variable prefer_trump "R prefers Donald Trump for President dummy (pre)"
replace prefer_trump=. if V201036==-9 | V201036==-1
replace prefer_trump=0 if V201036==1 | inrange(V201036, 3, 5)
replace prefer_trump=1 if V201036==2
label values prefer_trump vallab1
codebook V201036
codebook prefer_trump

gen prefer_jo = V201029
label variable prefer_jo "R prefers Jo Jorgensen for President dummy (pre)"
replace prefer_jo=. if V201036==-9 | V201036==-1
replace prefer_jo=0 if V201036==1 | V201036==2 | V201036==4 | V201036==5
replace prefer_jo=1 if V201036==3
label values prefer_jo vallab1
codebook V201036
codebook prefer_jo

gen prefer_howie = V201036
label variable prefer_howie "R prefers Howie Hawkins for President dummy (pre)"
replace prefer_howie=. if V201029==-9 | V201036==-1
replace prefer_howie=0 if inrange(V201036, 1, 3) | V201036==5
replace prefer_howie=1 if V201036==4
label values prefer_howie vallab1
codebook V201036
codebook prefer_howie

gen prefer_other_cand = V201036
label variable prefer_other_cand "R prefers other candidate for preisdent dummy (pre)"
replace prefer_other_cand=. if V201036==-9 | V201036==-1
replace prefer_other_cand=0 if inrange(V201036, 1, 4)
replace prefer_other_cand=1 if V201036==5
label values prefer_other_cand vallab1
codebook V201036
codebook prefer_other_cand

///V201036z all -2///

codebook V201037
gen strong_pref = V201037
label variable strong_pref "Preference strong for prefered Presidential Candidate dummy (pre)"
replace strong_pref=. if V201037==-1
replace strong_pref=0 if V201037==2
label values strong_pref vallab1
codebook V201037
codebook strong_pref

codebook V201038
gen house_vote = V201038
label variable house_vote "Did R vote for US House of Representatives dummy (pre)"
replace house_vote=. if V201038==-9 | V201038==-8 | V201038==-1
replace house_vote=0 if V201038==2
label values house_vote vallab1
codebook V201038
codebook house_vote

codebook V201039
gen cand_house = V201039
label variable cand_house "For whom did R vote for US House (pre)"
replace cand_house=. if V201039==-9 | V201039==-8 | V201039==-1
replace cand_house=3 if V201039==5
label define vallab9 1 "Democratic House Candidate" 2 "Republican House Candidate" 3 "Other"
label values cand_house vallab9
codebook V201039
codebook cand_house

gen voted_demhouse = V201039
label variable voted_demhouse "R voted for the Democratic House Candidate dummy (pre)"
replace voted_demhouse=. if inrange(V201039, -9, -1)
replace voted_demhouse=0 if inrange(V201039, 2, 5)
label values voted_demhouse vallab1
codebook V201039
codebook voted_demhouse

gen voted_rephouse = V201039
label variable voted_rephouse "R voted for Republican House Candidate dummy (pre)"
replace voted_rephouse=. if inrange(V201039, -9, -1)
replace voted_rephouse=0 if V201039==1 | V201039==3 | V201039==5
replace voted_rephouse=1 if V201039==2
label values voted_rephouse vallab1
codebook V201039
codebook voted_rephouse

gen voted_other_house = V201039
label variable voted_other_house "R voted for other candidate for US House dummy (pre)"
replace voted_other_house=. if inrange(V201039, -9, -1)
replace voted_other_house=0 if V201039==1 | V201039==2
replace voted_other_house=1 if V201039==3 | V201039==5
label values voted_other_house vallab1
codebook V201039
codebook voted_other_house

///V201039z and V201040 all -2///

codebook V201041
gen house_intent = V201041
label variable house_intent "Does R intend to vote for US House dummy (pre)"
replace house_intent=. if V201041==-9 | V201041==-8 | V201041==-1
replace house_intent=0 if V201041==2
label values house_intent vallab1
codebook V201041
codebook house_intent

codebook V201042
gen house_party_intent = V201042
label variable house_party_intent "For whom does R intend to vote for US House (pre)"
replace house_party_intent=. if V201042==-9 | V201042==-8 | V201042==-1 | V201042==4
///I wasn't sure where to put 4, so if it needs to be moved, please let me know///
replace house_party=3 if V201042==5
label values house_party_intent vallab9
codebook V201042
codebook house_party_intent

gen demhouse_intent = V201042
label variable demhouse_intent "Does R intend to vote Democrat for US House dummy (pre)"
replace demhouse_intent=. if V201042==-9 | V201042==-8 | V201042==-1 | V201042==4
replace demhouse_intent=0 if V201042==2 | V201042==3 | V201042==5
label values demhouse_intent vallab1
codebook V201042
codebook demhouse_intent

gen rephouse_intent = V201042
label variable rephouse_intent "Does R intend to vote Republican for US House dummy (pre)"
replace rephouse_intent=. if V201042==-9 | V201042==-8 | V201042==-1 | V201042==4
replace rephouse_intent=1 if V201042==2
replace rephouse_intent=0 if V201042==1 | V201042==3 | V201042==5
label values rephouse_intent vallab1
codebook V201042
codebook rephouse_intent

///V201042z and V201043 all -2///

codebook V201044
gen house_pref = V201044
label variable house_pref "Does R prefer US House Candidate dummy (pre)"
replace house_pref=. if V201044==-9 | V201044==-8 | V201044==-1
replace house_pref=0 if V201044==2
label values house_pref vallab1
codebook V201044
codebook house_pref

codebook V201045
gen house_party_pref = V201045
label variable house_party_pref "Whom does R prefer for US House (pre)"
replace house_party_pref=. if V201045==-9 | V201045==-8 | V201045==-1
replace house_party_pref=3 if V201045==5
label values house_party_pref vallab9
codebook V201045
codebook house_party_pref

gen prefer_demhouse = V201045
label variable prefer_demhouse "R prefers Democratic House candidate dummy (pre)"
replace prefer_demhouse=. if inrange(V201045, -9, -1)
replace prefer_demhouse=0 if inrange(V201045, 2, 5)
label values prefer_demhouse vallab1
codebook V201045
codebook prefer_demhouse

gen prefer_rephouse = V201045
label variable prefer_rephouse "R prefers Republican House candidate dummy (pre)"
replace prefer_rephouse=. if inrange(V201045, -9, -1)
replace prefer_rephouse=0 if V201045==1 | V201045==3 | V201045==5
replace prefer_rephouse=1 if V201045==2
label values prefer_rephouse vallab1
codebook V201045
codebook prefer_rephouse

gen prefer_other_house = V201045
label variable prefer_other_house "R prefers other US House candidate dummy (pre)"
replace prefer_other_house=. if inrange(V201045, -9, -1)
replace prefer_other_house=0 if V201045==1 | V201045==2
replace prefer_other_house=1 if V201045==3 | V201045==5
label values prefer_other_house vallab1
codebook V201045
codebook prefer_other_house

///V201045z-V201047x all -2///

codebook V201048
gen vote_sen = V201048
label variable vote_sen "Did R vote for US Senate dummy (pre)"
replace vote_sen=. if V201048==-9 | V201048==-8 | V201048==-1
replace vote_sen=0 if V201048==2
label values vote_sen vallab1
codebook V201048
codebook vote_sen

///V201049z and V201050 all -2///

codebook V201051
gen sen_intent = V201051
label variable sen_intent "Does R intend to vote for US Senate (pre)"
replace sen_intent=. if V201051==-9 | V201051==-8 | V201051==-1
replace sen_intent=0 if V201051==2
label values sen_intent vallab1
codebook V201051
codebook sen_intent

codebook V201052
gen sen_party_intent = V201052
label variable sen_party_intent "For whom does R intend to vote for US Senate (pre)"
replace sen_party_intent=. if V201052==-9 | V201052==-8 | V201052==-1
replace sen_party_intent=3 if V201052==5
label define vallab10 1 "Democratic Senate Candidate" 2 "Republican Senate Candidate" 3 "Other"
label values sen_party_intent vallab10
codebook V201052
codebook sen_party_intent

gen intend_demsen = V201052
label variable intend_demsen "R intends to vote for Democratic Senate candidate dummy (pre)"
replace intend_demsen=. if inrange(V201052, -9, -1)
replace intend_demsen=0 if inrange(V201052, 2, 5)
label values intend_demsen vallab1
codebook V201052
codebook intend_demsen

gen intend_repsen = V201052
label variable intend_repsen "R intends to vote for Republican Senate candidate dummy (pre)"
replace intend_repsen=. if inrange(V201052, -9, -1)
replace intend_repsen=0 if V201052==1 | V201052==3 | V201052==5
replace intend_repsen=1 if V201052==2
label values intend_repsen vallab1
codebook V201052
codebook intend_repsen

gen intend_other_sen = V201052
label variable intend_other_sen "R intends to vote for other candidate for US Senate dummy (pre)"
replace intend_other_sen=. if inrange(V201052, -9, -1)
replace intend_other_sen=0 if V201052==1 | V201052==2
replace intend_other_sen=1 if V201052==3 | V201052==5
label values intend_other_sen vallab1
codebook V201052
codebook intend_other_sen

///V201052z and V201053 all -2///

codebook V201054
gen sen_pref = V201054
label variable sen_pref "Does R prefer US Senate candidate dummy (pre)"
replace sen_pref=. if V201054==-9 | V201054==-8 | V201054==-1
replace sen_pref=0 if V201054==2
label values sen_pref vallab1
codebook V201054
codebook sen_pref

codebook V201055
gen sen_party_pref = V201055
label variable sen_party_pref "What US Senate candidate does R prefer (pre)"
replace sen_party_pref=. if V201055==-9 | V201055==-8 | V201055==-1
replace sen_party_pref=3 if V201055==5
label values sen_party_pref vallab10
codebook V201055
codebook sen_party_pref

gen prefer_demsen = V201055
label variable prefer_demsen "R prefers Democratic Senate candidate dummy (pre)"
replace prefer_demsen=. if inrange(V201055, -9, -1)
replace prefer_demsen=0 if inrange(V201055, 2, 5)
label values prefer_demsen vallab1
codebook V201055
codebook prefer_demsen

gen prefer_repsen = V201055
label variable prefer_repsen "R prefers Republican Senate candidate dummy (pre)"
replace prefer_repsen=. if inrange(V201055, -9, -1)
replace prefer_repsen=0 if V201055==1 | V201055==3 | V201055==5
replace prefer_repsen=1 if V201055==2
label values prefer_repsen vallab1
codebook V201055
codebook prefer_repsen

gen prefer_other_sen = V201055
label variable prefer_other_sen "R prefers other candidate for US Senate dummy (pre)"
replace prefer_other_sen=. if inrange(V201055, -9, -1)
replace prefer_other_sen=0 if V201055==1 | V201055==2
replace prefer_other_sen=1 if V201055==3 | V201055==5
label values prefer_other_sen vallab1
codebook V201055
codebook prefer_other_sen

///V201055z and V201056 all -2///

codebook V201057
gen voted_sen_spcl = V201057
label variable voted_sen_spcl "Did R vote for US Senate (special election) dummy (pre)"
replace voted_sen_spcl=. if V201057==-1
replace voted_sen_spcl=0 if V201057==2
label values voted_sen_spcl vallab1
codebook V201057
codebook voted_sen_spcl

codebook V201058
gen cand_sen_spcl = V201058
label variable cand_sen_spcl "R's vote for US Senate (special election) (pre)"
replace cand_sen_spcl=. if inrange(V201058, -9, -1)
replace cand_sen_spcl=3 if V201058==5
label values cand_sen_spcl vallab10
codebook V201058
codebook cand_sen_spcl

///I didn't make a demsen since no one reported voting for a democrat in the special election///
gen voted_repsen_spcl = V201058
label variable voted_repsen_spcl "R voted for Republican Senate candidate (special election) dummy (pre)"
replace voted_repsen_spcl=. if inrange(V201058, -9, -1)
replace voted_repsen_spcl=0 if V201058==5
replace voted_repsen_spcl=1 if V201058==2
label values voted_repsen_spcl vallab1
codebook V201058
codebook voted_repsen_spcl

gen voted_othersen_spcl = V201058
label variable voted_othersen_spcl "R voted for other candidate in US Senate special election dummy (pre)"
replace voted_othersen_spcl=. if inrange(V201058, -9, -1)
replace voted_othersen_spcl=0 if V201058==2
replace voted_othersen_spcl=1 if V201058==5
label values voted_othersen_spcl vallab1
codebook V201058
codebook voted_othersen_spcl

///V201058z and V201059 all -2///

codebook V201060
gen sen_spcl_intend = V201060
label variable sen_spcl_intend "Does R intend to vote for US Senate (special election) dummy (pre)"
replace sen_spcl_intend=. if V201060==-9 | V201060==-1
replace sen_spcl_intend=0 if V201060==2
label values sen_spcl_intend vallab1
codebook V201060
codebook sen_spcl_intend

codebook V201061
gen sen_spcl_party_intend = V201061
label variable sen_spcl_party_intend "Fr whom does R intend to vote for US Senate (special election) (pre)"
replace sen_spcl_party_intend=. if inrange(V201061, -9, -1)
replace sen_spcl_party_intend=3 if V201061==5
label values sen_spcl_party_intend vallab10
codebook V201061
codebook sen_spcl_party_intend

gen intend_demsen_spcl = V201061
label variable intend_demsen_spcl "R intends to vote for Democratic Senate candidate (special election) dummy (pre)"
replace intend_demsen_spcl=. if inrange(V201061, -9, -1)
replace intend_demsen_spcl=0 if V201061==2 | V201061==5
label values intend_demsen_spcl vallab1
codebook V201061
codebook intend_demsen_spcl

gen intend_repsen_spcl = V201061
label variable intend_repsen_spcl "R intends to vote for Republican Senate candidate (special election) dummy (pre)"
replace intend_repsen_spcl=. if inrange(V201061, -9, -1)
replace intend_repsen_spcl=0 if V201061==1 | V201061==5
replace intend_repsen_spcl=1 if V201061==2
label values intend_repsen_spcl vallab1
codebook V201061
codebook intend_repsen_spcl

gen intend_othersen_spcl = V201061
label variable intend_othersen_spcl "R intends to vote for other candidate (special election) dummy (pre)"
replace intend_othersen_spcl=. if inrange(V201061, -9, -1)
replace intend_othersen_spcl=0 if V201061==1 | V201061==2
replace intend_othersen_spcl=1 if V201061==5
label values intend_othersen_spcl vallab1
codebook V201061
codebook intend_othersen_spcl

///V201061z and V201062 all -2///
codebook V201063
gen sen_spcl_pref = V201063
label variable sen_spcl_pref "Does R prefer US Senate candidate (special election) dummy (pre)"
replace sen_spcl_pref=. if V201063==-8 | V201063==-1
replace sen_spcl_pref=0 if V201063==2
label values sen_spcl_pref vallab1
codebook V201063
codebook sen_spcl_pref

codebook V201064
gen sen_spcl_party_pref = V201064
label variable sen_spcl_party_pref "Which US Senate candidate does R prefer (pre)"
replace sen_spcl_party_pref=. if V201064==-1
replace sen_spcl_party_pref=3 if V201064==5
label values sen_spcl_party_pref vallab10
codebook V201064
codebook sen_spcl_party_pref

gen prefer_demsen_spcl = V201064
label variable prefer_demsen_spcl "R prefers Democratic Senate candidate (special election) dummy (pre)"
replace prefer_demsen_spcl=. if V201064==-1
replace prefer_demsen_spcl=0 if V201064==2 | V201064==5
label values prefer_demsen_spcl vallab1
codebook V201064
codebook prefer_demsen_spcl

gen prefer_repsen_spcl = V201064
label variable prefer_repsen_spcl "R prefers Republican Senate candidate (special election) dummy (pre)"
replace prefer_repsen_spcl=. if V201064==-1
replace prefer_repsen_spcl=0 if V201064==1 | V201064==5
replace prefer_repsen_spcl=1 if V201064==2
label values prefer_repsen_spcl vallab1
codebook V201064
codebook prefer_repsen_spcl

gen prefer_othersen_spcl = V201064
label variable prefer_othersen_spcl "R prefers other candidate (special election) dummy (pre)"
replace prefer_othersen_spcl=. if V201064==-1
replace prefer_othersen_spcl=0 if V201064==1 | V201064==2
replace prefer_othersen_spcl=1 if V201064==5
label values prefer_othersen_spcl vallab1
codebook V201064
codebook prefer_othersen_spcl

////V201064z and V201065 all -2///

codebook V201066
gen gov_vote = V201066
label variable gov_vote "Did R vote for governor dummy (pre)"
replace gov_vote=. if V201066==-1
replace gov_vote=0 if V201066==2
label values gov_vote vallab1
codebook V201066
codebook gov_vote

codebook V201067
gen gov_party = V201067
label variable gov_party "R's vote for governor (pre)"
replace gov_party=. if V201067==-9 | V201067==-8 | V201067==-1
replace gov_party=3 if V201067==5
label define vallab11 1 "Democratic Governor Candidate" 2 "Republican Governor Candidate" 3 "Other"
label values gov_party vallab11
codebook V201067
codebook gov_party

gen voted_demgov = V201067
label variable voted_demgov "R voted for Democratic Governor candidate dummy (pre)"
replace voted_demgov=. if inrange(V201067, -9, -1)
replace voted_demgov=0 if V201067==2 | V201067==5
label values voted_demgov vallab1
codebook V201067
codebook voted_demgov

gen voted_repgov = V201067
label variable voted_repgov "R voted for Republican Governor candidate dummy (pre)"
replace voted_repgov=. if inrange(V201067, -9, -1)
replace voted_repgov=0 if V201067==1 | V201067==5
replace voted_repgov=1 if V201067==2
label values voted_repgov vallab1
codebook V201067
codebook voted_repgov

gen voted_other_gov = V201067
label variable voted_other_gov "R voted for Other Governor candidate dummy (pre)"
replace voted_other_gov=. if inrange(V201067, -9, -1)
replace voted_other_gov=0 if V201067==1 | V201067==2
replace voted_other_gov=1 if V201067==5
label values voted_other_gov vallab1
codebook V201067
codebook voted_other_gov

///V201067z and V201068 all -2///

codebook V201069
gen gov_intent = V201069
label variable gov_intent "Does R intend to vote for governor (pre)"
replace gov_intent=. if V201069==-8 | V201069==-1
replace gov_intent=0 if V201069==2
label values gov_intent vallab1
codebook V201069
codebook gov_intent

codebook V201070
gen gov_party_intent = V201070
label variable gov_party_intent "For whom does R intend to vote for governor (pre)"
replace gov_party_intent=. if V201070==-9 | V201070==-8 | V201070==-1
replace gov_party_intent=3 if V201070==5
label values gov_party_intent vallab11
codebook V201070
codebook gov_party_intent

gen intend_demgov = V201070
label variable intend_demgov "R intends to vote for Democratic Governor candidate dummy (pre)"
replace intend_demgov=. if inrange(V201070, -9, -1)
replace intend_demgov=0 if V201070==2 | V201070==5
label values intend_demgov vallab1
codebook V201070
codebook intend_demgov

gen intend_repgov = V201070
label variable intend_repgov "R intends to vote for Republican Governor candidate dummy (pre)"
replace intend_repgov=. if inrange(V201070, -9, -1)
replace intend_repgov=0 if V201070==1 | V201070==5
replace intend_repgov=1 if V201070==2
label values intend_repgov vallab1
codebook V201070
codebook intend_repgov

gen intend_other_gov = V201070
label variable intend_other_gov "R intends to vote for Other Governor candidate dummy (pre)"
replace intend_other_gov=. if inrange(V201070, -9, -1)
replace intend_other_gov=0 if V201070==1 | V201070==2
replace intend_other_gov=1 if V201070==5
label values intend_other_gov vallab1
codebook V201070
codebook intend_other_gov

///V201070z and V201071 all -2///

codebook V201072
gen gov_pref = V201072
label variable gov_pref "Does R prefer gubernatorial candidate dummy (pre)"
replace gov_pref=. if V201072==-9 | V201072==-8 | V201072==-1
replace gov_pref=0 if V201072==2
label values gov_pref vallab1
codebook V201072
codebook gov_pref

codebook V201073
gen gov_party_pref = V201073
label variable gov_party_pref "Whom does R prefer for governor (pre)"
replace gov_party_pref=. if V201073==-9 | V201073==-1
label values gov_party_pref vallab11
codebook V201073
codebook gov_party_pref

gen prefer_demgov = V201073
label variable prefer_demgov "R prefers Democratic Governor candidate dummy (pre)"
replace prefer_demgov=. if inrange(V201073, -9, -1)
replace prefer_demgov=0 if V201073==2 | V201073==5
label values prefer_demgov vallab1
codebook V201073
codebook prefer_demgov

gen prefer_repgov = V201073
label variable prefer_repgov "R prefers Republican Governor candidate dummy (pre)"
replace prefer_repgov=. if inrange(V201073, -9, -1)
replace prefer_repgov=0 if V201073==1 | V201073==5
replace prefer_repgov=1 if V201073==2
label values prefer_repgov vallab1
codebook V201073
codebook prefer_repgov

codebook V201073z
///All -2///
codebook V201074
///All -2///

codebook V201075x
gen pres_vip_sum = V201075x
label variable pres_vip_sum "Summary: party of Presidential vote/intent/preference (pre)"
replace pres_vip_sum=. if V201075x==-1 | V201075x==12 | V201075x==22 | V201075x==32
///I chose to put "other candidate" options in missing so that this could be a polar spectrum///
replace pres_vip_sum=1 if V201075x==10
replace pres_vip_sum=2 if V201075x==20
replace pres_vip_sum=3 if V201075x==30
replace pres_vip_sum=4 if V201075x==31
replace pres_vip_sum=5 if V201075x==21
replace pres_vip_sum=6 if V201075x==11
///Please note that I coded these after coding most of the rest of the pre section, thus the sudden shift in vallab number///
label define vallab111 1 "Voted Democrat" 2 "Intend to vote Democrat" 3 "Prefer Democrat" 4 "Prefer Republican" 5 "Intend to vote Republican" 6 "Voted Republican"
label values pres_vip_sum vallab111
codebook V201075x
codebook pres_vip_sum

codebook V201076x
tab V201076x
gen house_vip_sum = V201076x
label variable house_vip_sum "Summary: party of U.S. House vote/intent/preference (pre)"
replace house_vip_sum=. if V201076x==-1 | V201076x==12 | V201076x==19 | V201076x==22 | V201076x==29 | V201076x==32 | V201076x==39
///I chose to put the open-ended answers under missing for the same reason I put other there///
replace house_vip_sum=1 if V201076x==10
replace house_vip_sum=2 if V201076x==20
replace house_vip_sum=3 if V201076x==30
replace house_vip_sum=4 if V201076x==31
replace house_vip_sum=5 if V201076x==21
replace house_vip_sum=6 if V201076x==11
label values house_vip_sum vallab111
codebook V201076x
codebook house_vip_sum

codebook V201077x
tab V201077x
gen senate_vip_sum = V201077x
label variable senate_vip_sum "Summary: party of U.S. Senate vote/intent/preference (pre)"
replace senate_vip_sum=. if V201077x==-1 | V201077x==12 | V201077x==19 | V201077x==22 | V201077x==29 | V201077x==32 | V201077x==39
replace senate_vip_sum=1 if V201077x==10
replace senate_vip_sum=2 if V201077x==20
replace senate_vip_sum=3 if V201077x==30
replace senate_vip_sum=4 if V201077x==31
replace senate_vip_sum=5 if V201077x==21
replace senate_vip_sum=6 if V201077x==11
label values senate_vip_sum vallab111
tab V201077x
codebook senate_vip_sum

codebook V201078x
tab V201078x
gen gov_vip_sum = V201078x
label variable gov_vip_sum "Summary: party of gubernatorial vote/intent/preference (pre)"
replace gov_vip_sum=. if V201078x==-1 | V201078x==12 | V201078x==22 | V201078x==29 | V201078x==39
replace gov_vip_sum=1 if V201078x==10
replace gov_vip_sum=2 if V201078x==20
replace gov_vip_sum=3 if V201078x==30
replace gov_vip_sum=4 if V201078x==31
replace gov_vip_sum=5 if V201078x==21
replace gov_vip_sum=6 if V201078x==11
label values gov_vip_sum vallab111
tab V201078x
codebook gov_vip_sum

codebook V201100
gen vote_likely = V201100
label variable vote_likely "How likely is it that R will vote in November (pre)"
replace vote_likely=. if V201100==-9 | V201100==-8 | V201100==-1
replace vote_likely=0 if V201100==5
replace vote_likely=1 if V201100==4
replace vote_likely=2 if V201100==3
replace vote_likely=3 if V201100==2
replace vote_likely=4 if V201100==1
label define vallab12 0 "Not likely at all" 1 "Slightly likely" 2 "Moderately likely" 3 "Very Likely" 4 "Extremely likely"
label values vote_likely vallab12
codebook V201100
codebook vote_likely

codebook V201101
gen vote_2016a = V201101
label variable vote_2016a "Did R vote for President in 2016 dummy version 1a (pre)"
replace vote_2016a=. if V201101==-9 | V201101==-8 | V201101==-1
replace vote_2016a=0 if V201101==2
label values vote_2016a vallab1
codebook V201101
codebook vote_2016a

codebook V201102
gen vote_2016b = V201102
label variable vote_2016b "Did R vote for President in 2016 dummy version 1b (pre)"
replace vote_2016b=. if inrange(V201102, -9, -1)
replace vote_2016b=0 if V201102==2
label values vote_2016b vallab1
codebook V201102
codebook vote_2016b

codebook V201103
gen preschoice_2016 = V201103
label variable preschoice_2016 "Recall of last (2016) Presidential vote choice (pre)"
replace preschoice_2016=. if V201103==-9 | V201103==-8 | V201103==-1
replace preschoice_2016=3 if V201103==5
label define vallab13 1 "Hillary Clinton" 2 "Donald Trump" 3 "Other"
label values preschoice_2016 vallab13
codebook V201103
codebook preschoice_2016

gen voted_clinton = V201103
label variable voted_clinton "Voted Clinton dummy"
replace voted_clinton=. if V201103==-9 | V201103==-8 | V201103==-1
replace voted_clinton=0 if V201103==2 | V201103==5
label values voted_clinton vallab1
codebook V201103
codebook voted_clinton

gen voted_trump2016 = V201103
label variable voted_trump2016 "Voted Trump (2016) dummy"
replace voted_trump2016=. if V201103==-9 | V201103==-8 | V201103==-1
replace voted_trump2016=1 if V201103==2
replace voted_trump2016=0 if V201103==1 | V201103==5
label values voted_trump2016 vallab1
codebook V201103
codebook voted_trump2016

codebook V201103z
///All -2///

codebook V201104
gen voted_2012 = V201104
label variable voted_2012 "Did R vote for President in 2012 election dummy (pre)"
replace voted_2012=. if V201104==-9 | V201104==-8
replace voted_2012=0 if V201104==2
label values voted_2012 vallab1
codebook V201104
codebook voted_2012

codebook V201105
gen preschoice_2012 = V201105
label variable preschoice_2012 "Recall of 2012 Presidential vote choice (pre)"
replace preschoice_2012=. if V201105==-9 | V201105==-8 | V201105==-1
replace preschoice_2012=3 if V201105==5
label define vallab14 1 "Barack Obama" 2 "Mitt Romney" 3 "Other"
label values preschoice_2012 vallab14
codebook V201105
codebook preschoice_2012

gen voted_obama = V201105
label variable voted_obama "Voted Obama dummy"
replace voted_obama=. if V201105==-9 | V201105==-8 | V201105==-1
replace voted_obama=0 if V201105==2 | V201105==5
label values voted_obama vallab1
codebook V201105
codebook voted_obama

gen voted_romney = V201105
label variable voted_romney "Voted Romney dummy"
replace voted_romney=. if V201105==-9 | V201105==-8 | V201105==-1
replace voted_romney=1 if V201105==2
replace voted_romney=0 if V201105==1 | V201105==5
label values voted_romney vallab1
codebook V201105
codebook voted_romney

codebook V201105z
///All -2///

codebook V201106
gen biden_like = V201106
label variable biden_like "Is there anything R likes about Democratic Presidential candidate dummy (pre)"
replace biden_like=. if V201106==-9 | V201106==-8
replace biden_like=0 if V201106==2
label values biden_like vallab1
codebook V201106
codebook biden_like

codebook V201107
///All -2///

codebook V201108
gen biden_dislike = V201108
label variable biden_dislike "Is there anything R dislikes about Democratic Presidential candidate dummy (pre)"
replace biden_dislike=. if V201108==-9 | V201108==-8
replace biden_dislike=0 if V201108==2
label values biden_dislike vallab1
codebook V201108
codebook biden_dislike

codebook V201109
///All -2///

codebook V201110
gen trump_like = V201110
label variable trump_like "Is there anythign R likes about Republican Presidential candidate dummy (pre)"
replace trump_like=. if V201110==-9 | V201110==-8
replace trump_like=0 if V201110==2
label values trump_like vallab1
codebook V201110
codebook trump_like

codebook V201111
///All -2///

codebook V201112
gen trump_dislike = V201112
label variable trump_dislike "Is there anything R dislikes about Republican Presidential candidate dummy (pre)"
replace trump_dislike=. if V201112==-9
replace trump_dislike=0 if V201112==2
label values trump_dislike vallab1
codebook V201112
codebook trump_dislike

codebook V201113
///All -2///

codebook V201114
gen rt_track = V201114
label variable rt_track "Are things in the country on right track dummy (pre)"
replace rt_track=. if V201114==-9 | V201114==-8
replace rt_track=0 if V201114==2
label values rt_track vallab1
codebook V201114
codebook rt_track

codebook V201115
gen hope = V201115
label variable hope "How hopeful R feels about how things are going in the country (pre)"
replace hope=. if V201115==-9 | V201115==-8
replace hope=0 if V201115==1
replace hope=1 if V201115==2
replace hope=2 if V201115==3
replace hope=3 if V201115==4
replace hope=4 if V201115==5
label define vallab15 0 "Not at all" 1 "A little" 2 "Somewhat" 3 "Very" 4 "Extremely"
label values hope vallab15
codebook V201115
codebook hope

codebook V201116
gen fear = V201116
label variable fear "How afraid R feels about how things are going in the country (pre)"
replace fear=. if V201116==-9 | V201116==-8
replace fear=0 if V201116==1
replace fear=1 if V201116==2
replace fear=2 if V201116==3
replace fear=3 if V201116==4
replace fear=4 if V201116==5
label values fear vallab15
codebook V201116
codebook fear

codebook V201117
gen outrage = V201117
label variable outrage "How outraged R feels about how things are going in the country (pre)"
replace outrage=. if V201117==-9 | V201117==-8
replace outrage=0 if V201117==1
replace outrage=1 if V201117==2
replace outrage=2 if V201117==3
replace outrage=3 if V201117==4
replace outrage=4 if V201117==5
label values outrage vallab15
codebook V201117
codebook outrage

codebook V201118
gen anger = V201118
label variable anger "How angry R feels about how things are going in the country (pre)"
replace anger=. if V201118==-9 | V201118==-8
replace anger=0 if V201118==1
replace anger=1 if V201118==2
replace anger=2 if V201118==3
replace anger=3 if V201118==4
replace anger=4 if V201118==5
label values anger vallab15
codebook V201118
codebook anger

codebook V201119
gen happy = V201119
label variable happy "How happy R feels about how things are going in the country (pre)"
replace happy=. if V201119==-9 | V201119==-8
replace happy=0 if V201119==1
replace happy=1 if V201119==2
replace happy=2 if V201119==3
replace happy=3 if V201119==4
replace happy=4 if V201119==5
label values happy vallab15
codebook V201119
codebook happy

codebook V201120
gen worry = V201120
label variable worry "How worried R feels about how things are going in the country (pre)"
replace worry=. if V201120==-9
replace worry=0 if V201120==1
replace worry=1 if V201120==2
replace worry=2 if V201120==3
replace worry=3 if V201120==4
replace worry=4 if V201120==5
label values worry vallab15
codebook V201120
codebook worry

codebook V201121
gen proud = V201121
label variable proud "How proud R feels about how things are going in the country (pre)"
replace proud=. if V201121==-9 | V201121==-8
replace proud=0 if V201121==1
replace proud=1 if V201121==2
replace proud=2 if V201121==3
replace proud=3 if V201121==4
replace proud=4 if V201121==5
label values proud vallab15
codebook V201121
codebook proud

codebook V201122
gen irritated = V201122
label variable irritated "How irritated R feels about how things are going in the country (pre)"
replace irritated=. if V201122
replace irritated=0 if V201122==1
replace irritated=1 if V201122==2
replace irritated=2 if V201122==3
replace irritated=3 if V201122==4
replace irritated=4 if V201122==5
label values irritated vallab15
codebook V201122
codebook irritated

codebook V201123
gen nervous = V201123
label variable nervous "How nervous R feels about how things are going in the country (pre)"
replace nervous=. if V201123==-9
replace nervous=0 if V201123==1
replace nervous=1 if V201123==2
replace nervous=2 if V201123==3
replace nervous=3 if V201123==4
replace nervous=4 if V201123==5
label values nervous vallab15
codebook V201123
codebook nervous

codebook V201124
gen approve_congress = V201124
label variable approve_congress "Approval of Congress handling its job (pre)"
replace approve_congress=. if V201124==-9 | V201124==-8
replace approve_congress=0 if V201124==2
label define vallab16 0 "Disapprove" 1 "Approve"
label values approve_congress vallab16
codebook V201124
codebook approve_congress

codebook V201125
///Don't think this should be coded, the next one sums up better///

codebook V201126x
gen congress_approval_summary = V201126x
label variable congress_approval_summary "Approval of Congress handling its job summary (pre)"
replace congress_approval_summary=. if V201126x==-2
replace congress_approval_summary=1 if V201126x==4
replace congress_approval_summary=2 if V201126x==3
replace congress_approval_summary=3 if V201126x==2
replace congress_approval_summary=4 if V201126x==1
label define vallab17 1 "Disapprove strongly" 2 "Disapprove not strongly" 3 "Approve not stongly" 4 "Approve strongly"
label values congress_approval_summary vallab17
codebook V201126x
codebook congress_approval_summary

codebook V201127
gen pres_approval = V201127
label variable pres_approval "Approve or disapprove President handling job (pre)"
replace pres_approval=. if V201127==-9 | V201129==-8
replace pres_approval=0 if V201127==2
label values pres_approval vallab16
codebook V201127
codebook pres_approval

codebook V201128
///Again, the next one gives a better summary///

codebook V201129x
gen pres_approval_summary = V201129x
label variable pres_approval_summary "Approval of President handling job summary (pre)"
replace pres_approval_summary=. if V201129x==-2
replace pres_approval_summary=4 if V201129x==1
replace pres_approval_summary=3 if V201129x==2
replace pres_approval_summary=2 if V201129x==3
replace pres_approval_summary=1 if V201129x==4
label values pres_approval_summary vallab17
codebook V201129x
codebook pres_approval_summary

codebook V201130
gen pres_econ_approval = V201130
label variable pres_econ_approval "Approve or disapprove of president handling economy (pre)"
replace pres_econ_approval=. if V201130==-9 | V201130==-8
replace pres_econ_approval=0 if V201130==2
label values pres_econ_approval vallab16
codebook V201130
codebook pres_econ_approval

codebook V201131
///Will skip ones like these from now on///

codebook V201132x
gen pres_econ_appsum = V201132x
label variable pres_econ_appsum "Summary: approve or disapprove President handling economy (pre)"
replace pres_econ_appsum=. if V201132x==-2
replace pres_econ_appsum=1 if V201132x==4
replace pres_econ_appsum=2 if V201132x==3
replace pres_econ_appsum=3 if V201132x==2
replace pres_econ_appsum=4 if V201132x==1
label values pres_econ_appsum vallab17
codebook V201132x
codebook pres_econ_appsum

codebook V201133
gen pres_foreign_approval = V201133
label variable pres_foreign_approval "Approve or disapprove president handling foreign relations (pre)"
replace pres_foreign_approval=. if V201133==-9 | V201133==-8
replace pres_foreign_approval=0 if V201133==2
label values pres_foreign_approval vallab16
codebook V201133
codebook pres_foreign_approval

codebook V201135x
gen pres_foreign_appsum = V201135x
label variable pres_foreign_appsum "Summary: Approve or disapprove President handling foreign relations (pre)"
replace pres_foreign_appsum=. if V201135==-2
replace pres_foreign_appsum=1 if V201135x==4
replace pres_foreign_appsum=2 if V201135x==3
replace pres_foreign_appsum=3 if V201135x==2
replace pres_foreign_appsum=4 if V201135x==1
label values pres_foreign_appsum vallab17
codebook V201135x
codebook pres_foreign_appsum

codebook V201136
gen pres_hlth_approval = V201136
label variable pres_hlth_approval "Approve or disapprove President handling healthcare (pre)"
replace pres_hlth_approval=. if V201136==-9 | V201136==-8
replace pres_hlth_approval=0 if V201136==2
label values pres_hlth_approval vallab16
codebook V201136
codebook pres_hlth_approval

codebook V201138x
gen pres_hlth_appsum = V201138x
label variable pres_hlth_appsum "Summary: approve or disapprove Preisdent handling healthcare (pre)"
replace pres_hlth_appsum=. if V201138x==-2
replace pres_hlth_appsum=1 if V201138x==4
replace pres_hlth_appsum=2 if V201138x==3
replace pres_hlth_appsum=3 if V201138x==2
replace pres_hlth_appsum=4 if V201138x==1
label values pres_hlth_appsum vallab17
codebook V201138x
codebook pres_hlth_appsum

codebook V201139
gen pres_imm_approval = V201139
label variable pres_imm_approval "Approve or disapprove President handling immigration (pre)"
replace pres_imm_approval=. if V201139==-9 | V201139==-8
replace pres_imm_approval=0 if V201139==2
label values pres_imm_approval vallab16
codebook V201139
codebook pres_imm_approval

codebook V201141x
gen pres_imm_appsum = V201141x
label variable pres_imm_appsum "Summary: approve or disapprove President handling immigration (pre)"
replace pres_imm_appsum=. if V201141x==-2
replace pres_imm_appsum=1 if V201141x==4
replace pres_imm_appsum=2 if V201141x==3
replace pres_imm_appsum=3 if V201141x==2
replace pres_imm_appsum=4 if V201141x==1
label values pres_imm_appsum vallab17
codebook V201141x
codebook pres_imm_appsum

codebook V201142
gen pres_covid_approval = V201142
label variable pres_covid_approval "Approve or disapprove president handling COVID-19 (pre)"
replace pres_covid_approval=. if V201142==-9 | V201142==-8
replace pres_covid_approval=0 if V201142==2
label values pres_covid_approval vallab16
codebook V201142
codebook pres_covid_approval

codebook V201144x
gen pres_covid_appsum = V201144x
label variable pres_covid_appsum "Summary: approve or disapprove president handling COVID-19 (pre)"
replace pres_covid_appsum=. if V201144x==-2
replace pres_covid_appsum=1 if V201144x==4
replace pres_covid_appsum=2 if V201144x==3
replace pres_covid_appsum=3 if V201144x==2
replace pres_covid_appsum=4 if V201144x==1
label values pres_covid_appsum vallab17
codebook V201144x
codebook pres_covid_appsum

codebook V201145
gen gov_covid_approval = V201145
label variable gov_covid_approval "Approve or disapprove R's governor handling covid (pre)"
replace gov_covid_approval=. if V201145==-9 | V201145==-8
replace gov_covid_approval=0 if V201145==2
label values gov_covid_approval vallab16
codebook V201145
codebook gov_covid_approval

codebook V201147x
gen gov_covid_appsum = V201147x
label variable gov_covid_appsum "Summary: approval or disapprove R's governor handling covid (pre)"
replace gov_covid_appsum=. if V201147x==-2
replace gov_covid_appsum=1 if V201147x==4
replace gov_covid_appsum=2 if V201147x==3
replace gov_covid_appsum=3 if V201147x==2
replace gov_covid_appsum=4 if V201147x==1
label values gov_covid_appsum vallab17
codebook V201147x
codebook gov_covid_appsum

codebook V201148
gen local_covid_approval = V201148
label variable local_covid_approval "Approve or disapprove local government handling covid (pre)"
replace local_covid_approval=. if V201148==-9 | V201148==-8
replace local_covid_approval=0 if V201148==2
label values local_covid_approval vallab16
codebook V201148
codebook local_covid_approval

codebook V201150x
gen local_covid_appsum = V201150x
label variable local_covid_appsum "Summary: approve or disapprove local government handling covid (pre)"
replace local_covid_appsum=. if V201150x==-2
replace local_covid_appsum=1 if V201150x==4
replace local_covid_appsum=2 if V201150x==3
replace local_covid_appsum=3 if V201150x==2
replace local_covid_appsum=4 if V201150x==1
label values local_covid_appsum vallab17
codebook V201150x
codebook local_covid_appsum

codebook V201151
gen biden_ftherm = V201151
label variable biden_ftherm "Feeling Thermometer: Joe Biden, Democratic Presidential Candidate (pre)"
replace biden_ftherm=. if V201151==-9 | V201151==-4 | V201151==998
codebook V201151
codebook biden_ftherm

codebook V201152
gen trump_ftherm = V201152
label variable trump_ftherm "Feeling Thermometer: Donald Trump, Republican  Presidential Candidate (pre)"
replace trump_ftherm=. if V201152==-9
codebook V201152
codebook trump_ftherm

codebook V201153
gen harris_ftherm = V201153
label variable harris_ftherm "Feeling Thermometer: Kamala Harris, Democratic Vice-Presidential candidate (pre)"
replace harris_ftherm=. if V201153==-9 | V201153==-4 | V201153==998 | V201153==999
codebook V201153
codebook harris_ftherm

codebook V201154
gen pence_ftherm = V201154
label variable pence_ftherm "Feeling Thermometer: Mike Pence, Republican Vice-Presidential candidate (pre)"
replace pence_ftherm=. if V201154==-9 | V201154==-4 | V201154==998 | V201154==999
codebook V201154
codebook pence_ftherm

codebook V201155
gen obama_ftherm = V201155
label variable obama_ftherm "Feeling Thermometer: Barack Obama (pre)"
replace obama_ftherm=. if V201155==-9
codebook V201155
codebook obama_ftherm

codebook V201156
gen demparty_ftherm = V201156
label variable demparty_ftherm "Feeling Thermometer: Democratic Party (pre)"
replace demparty_ftherm=. if V201156==-9 | V201156==998
codebook V201156
codebook demparty_ftherm

codebook V201157
gen repparty_ftherm = V201157
label variable repparty_ftherm "Feeling Thermometer: Republican Party (pre)"
replace repparty_ftherm=. if V201157==-9 | V201157==998
codebook V201157
codebook repparty_ftherm

codebook V201158
gen dparty_like = V201158
label variable dparty_like "Is there anything R likes about the Democratic Party (pre)"
replace dparty_like=. if V201158==-9 | V201158==-8
replace dparty_like=0 if V201158==2
label values dparty_like vallab1
codebook V201158
codebook dparty_like

codebook V201159
///All -2///

codebook V201160
gen dparty_dislike = V201160
label variable dparty_dislike "Is there anything R dislikes about Democratic Party (pre)"
replace dparty_dislike=. if V201160==-9 | V201160==-8
replace dparty_dislike=0 if V201160==2
label values dparty_dislike vallab1
codebook V201160
codebook dparty_dislike

codebook V201161
///All -2///

codebook V201162
gen rparty_like = V201162
label variable rparty_like "Is there anything R likes about Republican Party (pre)"
replace rparty_like=. if V201162==-9 | V201162==-8
replace rparty_like=0 if V201162==2
label values rparty_like vallab1
codebook V201162
codebook rparty_like

codebook V201163
///All -2///

codebook V201164
gen rparty_dislike = V201164
label variable rparty_dislike "Is there anything R dislikes about Republican Party"
replace rparty_dislike=. if V201164==-9 | V201164==-8
replace rparty_dislike=0 if V201164==2
label values rparty_dislike vallab1
codebook V201164
codebook rparty_dislike

codebook V201165
///All -2///

codebook V201200
gen ideo_7 = V201200
label variable ideo_7 "7pt scale liberal-conservative placement (pre)"
replace ideo_7=. if V201200==-9 | V201200==-8 | V201200==99
label define vallab18 1 "Extremely liberal" 2 "Liberal" 3 "Slightly liberal" 4 "Moderate; middle of the road" 5 "Slightly conservative" 6 "Conservative" 7 "Extremely conservative"
label values ideo_7 vallab18
codebook V201200
codebook ideo_7

codebook V201201
gen ideo_3 = V201201
label variable ideo_3 "If R had to choose liberal or conservatice self-placement (pre)"
replace ideo_3=. if V201201==-9 | V201201==-4 | V201201==-1
replace ideo_3=2 if V201201==-8 | V201201==3
replace ideo_3=3 if V201201==2
label define vallab19 1 "Liberal" 2 "Moderate/Don't Know" 3 "Conservative"
label values ideo_3 vallab19
codebook V201201
codebook ideo_3

codebook V201202
gen demideo_7 = V201202
label variable demideo_7 "7pt scale: Democratic Presidential candidate (pre)"
replace demideo_7=. if V201202==-9 | V201202==-8
label values demideo_7 vallab18
codebook V201202
codebook demideo_7

codebook V201203
gen repideo_7 = V201203
label variable repideo_7 "7pt scale Republican Presidential candidate (pre)"
replace repideo_7=. if V201203==-9 | V201203==-8
label values repideo_7 vallab18
codebook V201203
codebook repideo_7

codebook V201204
gen dhouse_ideo_7 = V201204
label variable dhouse_ideo_7 "7pt scale Democratic House candidate (pre)"
replace dhouse_ideo_7=. if V201204==-9 | V201204==-8 | V201204==-1
label values dhouse_ideo_7 vallab18
codebook V201204
codebook dhouse_ideo_7

codebook V201205
gen rhouse_ideo_7 = V201205
label variable rhouse_ideo_7 "7pt scale Republican House candidate (pre)"
replace rhouse_ideo_7=. if V201205==-9 | V201205==-8 | V201205==-1
label values rhouse_ideo_7 vallab18
codebook V201205
codebook rhouse_ideo_7

codebook V201206
gen dparty_ideo_7 = V201206
label variable dparty_ideo_7 "7pt scale Democratic Party (pre)"
replace dparty_ideo_7=. if V201206==-9 | V201206==-8
label values dparty_ideo_7 vallab18
codebook V201206
codebook dparty_ideo_7

codebook V201207
gen rparty_ideo_7 = V201207
label variable rparty_ideo_7 "7pt scale Republican Party (pre)"
replace rparty_ideo_7=. if V201207==-9 | V201207==-8
label values rparty_ideo_7 vallab18
codebook V201207
codebook rparty_ideo_7

codebook V201208
gen biden_leader = V201208
label variable biden_leader "Democratic Presidential candidate trait: strong leadership (pre)"
replace biden_leader=. if V201208==-9 | V201209==-8
replace biden_leader=0 if V201208==5
replace biden_leader=1 if V201208==4
replace biden_leader=2 if V201208==3
replace biden_leader=3 if V201208==2
replace biden_leader=4 if V201208==1
label define vallab20 0 "Not well at all" 1 "Slightly well" 2 "Moderately well" 3 "Very well" 4 "Extremely well"
label values biden_leader vallab20
codebook V201208
codebook biden_leader

codebook V201209
gen biden_cares = V201209
label variable biden_cares "Dem Pres trait: really cares (pre)"
replace biden_cares=. if V201209==-9 | V201209==-8
replace biden_cares=0 if V201209==5
replace biden_cares=1 if V201209==4
replace biden_cares=2 if V201209==3
replace biden_cares=3 if V201209==2
replace biden_cares=4 if V201209==1
label values biden_cares vallab20
codebook V201209
codebook biden_cares

codebook V201210
gen biden_knows = V201210
label variable biden_knows "Dem Pres trait: knowledgeable (pre)"
replace biden_knows=. if V201210==-9 | V201210==-8
replace biden_knows=0 if V201210==5
replace biden_knows=1 if V201210==4
replace biden_knows=2 if V201210==3
replace biden_knows=3 if V201210==2
replace biden_knows=4 if V201210==1
label values biden_knows vallab20
codebook V201210
codebook biden_knows

codebook V201211
gen biden_honest = V201211
label variable biden_honest "Dem Pres trait: honest (pre)"
replace biden_honest=. if V201211==-9 | V201211==-8
replace biden_honest=0 if V201211==5
replace biden_honest=1 if V201211==4
replace biden_honest=2 if V201211==3
replace biden_honest=3 if V201211==2
replace biden_honest=4 if V201211==1
label values biden_honest vallab20
codebook V201211
codebook biden_honest

codebook V201212
gen trump_leader = V201212
label variable trump_leader "Republican Presidential Candidate trait: Strong leadership (pre)"
replace trump_leader=. if V201212==-9
replace trump_leader=0 if V201212==5
replace trump_leader=1 if V201212==4
replace trump_leader=2 if V201212==3
replace trump_leader=3 if V201212==2
replace trump_leader=4 if V201212==1
label values trump_leader vallab20
codebook V201212
codebook trump_leader

codebook V201213
gen trump_cares = V201213
label variable trump_cares "Rep Pres trait: really cares (pre)"
replace trump_cares=. if V201213==-9
replace trump_cares=0 if V201213==5
replace trump_cares=1 if V201213==4
replace trump_cares=2 if V201213==3
replace trump_cares=3 if V201213==2
replace trump_cares=4 if V201213==1
label values trump_cares vallab20
codebook V201213
codebook trump_cares

codebook V201214
gen trump_knows = V201214
label variable trump_knows "Rep Pres trait: knowledgeable (pre)"
replace trump_knows=. if V201214==-9 | V201214==-8
replace trump_knows=0 if V201214==5
replace trump_knows=1 if V201214==4
replace trump_knows=2 if V201214==3
replace trump_knows=3 if V201214==2
replace trump_knows=4 if V201214==1
label values trump_knows vallab20
codebook V201214
codebook trump_knows

codebook V201215
gen trump_honest = V201215
label variable trump_honest "Rep Pres trait: honest (pre)"
replace trump_honest=. if V201215==-9 | V201215==-8
replace trump_honest=0 if V201215==5
replace trump_honest=1 if V201215==4
replace trump_honest=2 if V201215==3
replace trump_honest=3 if V201215==2
replace trump_honest=4 if V201215==1
label values trump_honest vallab20
codebook V201215
codebook trump_honest

codebook V201216
gen care_winner = V201216
label variable care_winner "How much R cares who wins Presidential Election (pre)"
replace care_winner=. if V201216==-9 | V201216==-8
replace care_winner=0 if V201216==5
replace care_winner=1 if V201216==4
replace care_winner=2 if V201216==3
replace care_winner=3 if V201216==2
replace care_winner=4 if V201216==1
label define vallab21 0 "Not at all" 1 "A little" 2 "A moderate amount" 3 "A lot" 4 "A great deal"
label values care_winner vallab21
codebook V201216
codebook care_winner

codebook V201217
gen thinks_winner = V201217
label variable thinks_winner "Who does R think will be elected President (pre)"
replace thinks_winner=. if V201217==-9 | V201217==-8
replace thinks_winner=3 if V201217==5
label define vallab22 1 "Joe Biden" 2 "Donald Trump" 3 "Other"
label values thinks_winner vallab22
codebook V201217
codebook thinks_winner

gen thinks_biden = V201217
label variable thinks_biden "R thinks Biden will win dummy (pre)"
replace thinks_biden=. if V201217==-9 | V201217==-8
replace thinks_biden=0 if V201217==2 | V201217==5
label values thinks_biden vallab1
codebook V201217
codebook thinks_biden

gen thinks_trump = V201217
label variable thinks_trump "R thinks Trump will win dummy (pre)"
replace thinks_trump=. if V201217==-9 | V201217==-8
replace thinks_trump=1 if V201217==2
replace thinks_trump=0 if V201217==1 | V201217==5
label values thinks_trump vallab1
codebook V201217
codebook thinks_trump

codebook V201217z
///All-2///

codebook V201218
gen how_close = V201218
label variable how_close "Will Presidential race be close or will winner win by a lot (pre)"
replace how_close=. if V201218==-9 | V201218==-8 | V201218==-1
replace how_close=0 if V201218==2
label define vallab23 0 "Win by quite a bit (not close)" 1 "Will be close"
label values how_close vallab23
codebook V201218
codebook how_close

codebook V201219
gen carry_state = V201219
label variable carry_state "Which Presidential candidate will care state (pre)"
replace carry_state=. if V201219==-9 | V201219==-8
replace carry_state=3 if V201219==5
label values carry_state vallab22
codebook V201219
codebook carry_state

gen biden_state = V201219
label variable biden_state "R thinks Biden will carry state (pre)"
replace biden_state=. if V201219==-9 | V201219==-8
replace biden_state=0 if V201219==2 | V201219==5
label values biden_state vallab1
codebook V201219
codebook biden_state

gen trump_state = V201219
label variable trump_state "R thinks Trump will carry state (pre)"
replace trump_state=. if V201219==-9 | V201219==-8
replace trump_state=0 if V201219==1 | V201219==5
replace trump_state=1 if V201219==2
codebook V201219
codebook trump_state

codebook V201219z
///All -2///

codebook V201220
gen close_state = V201220
label variable close_state "Will presidential race be close in state (pre)"
replace close_state=. if V201220==-9 | V201220==-8 | V201220==-1
replace close_state=0 if V201220==2
label values close_state vallab23
codebook V201220
codebook close_state

codebook V201221
codebook V201222
///Both of these seem like the same question and have about half -1 reponses; not sure how to code///

codebook V201223
///A lot of -1 here too///
gen strong_duty = V201223
label variable strong_duty "How stronlgy does R feel that voting is a duty (pre)"
replace strong_duty=. if V201223==-9 | V201223==-1
replace strong_duty=1 if V201223==3
replace strong_duty=3 if V201223==1
label define vallab24 1 "A little strongly" 2 "Moderately strongly" 3 "Extremely strongly"
label values strong_duty vallab24
codebook V201223
codebook strong_duty

codebook V201224
///Lots of -1 here///
gen strong_choice = V201224
label variable strong_choice "How strongly does R feel that voting is a choice (pre)"
replace strong_choice=. if V201224==-9 | V201224==-1
replace strong_choice=1 if V201224==3
replace strong_choice=3 if V201224==1
label values strong_choice vallab24
codebook V201224
codebook strong_choice

codebook V201225x
///This seems to be a sum of the previous questions///
gen duty_choice_7 = V201225x
label variable duty_choice "Voting as a duty or choice (pre)"
replace duty_choice_7=. if V201225x==-2
label define vallab25 1 "Very strongly a duty" 2 "Moderately strongly a duty" 3 "A little strongly a duty" 4 "Neither a duty not a choice" 5 "A little strongly a choice" 6 "Moderately strongly a choice" 7 "Verys trongly a choice"
label values duty_choice_7 vallab25
codebook V201225x
codebook duty_choice_7

codebook V201226
gen split_dummy = V201226
label variable split_dummy "Split-ticket voting dummy(pre)"
replace split_dummy=. if V201226==-9 | V201226==-8
replace split_dummy=1 if V201226==3
replace split_dummy=0 if V201226==1 | V201226==2 | V201226==4
label values split_dummy vallab1
codebook V201226
codebook split_dummy

gen straight_dem = V201226
label variable straight_dem "Straight Dem voting dummy (pre)"
replace straight_dem=. if V201226==-9 | V201226==-8
replace straight_dem=0 if V201226==2 | V201226==3 | V201226==4
label values straight_dem vallab1
codebook V201226
codebook straight_dem

gen straight_rep = V201226
label variable straight_rep "Straight Rep voting dummy (pre)"
replace straight_rep=. if V201226==-9 | V201226==-8
replace straight_rep=0 if V201226==1 | V201226==3 | V201226==4
replace straight_rep=1 if V201226==2
label values straight_rep vallab1
codebook V201226
codebook straight_rep

codebook V201227
gen party_split_gov = V201227
label variable party_split_gov "Party Control or Split Government (pre)"
replace party_split_gov=. if V201227==-9 | V201227==-8
replace party_split_gov=0 if V201227==3
label define vallab26 0 "It doesn't matter" 1 "Better when one party controls both" 2 "Better when control is split"
label values party_split_gov vallab26
codebook V201227
codebook party_split_gov

gen party_control = V201227
label variable party_control "Party Control dummy (pre)"
replace party_control=. if V201227==-9 | V201227==-8
replace party_control=0 if V201227==2 | V201227==3
label values party_control vallab1
codebook V201227
codebook party_control

gen split_gov = V201227
label variable split_gov "Split Government dummy (pre)"
replace split_gov=. if V201227==-9 | V201227==-8
replace split_gov=0 if V201227==1 | V201227==3
replace split_gov=1 if V201227==2
label values split_gov vallab1
codebook V201227
codebook split_gov

codebook V201228
gen party_id = V201228
label variable party_id "Does R think of self as Democrat, Republican, or Independent (pre)"
replace party_id=. if V201228==-9 | V201228==-8 | V201228==-4
replace party_id=0 if V201228==5
label define vallab27 0 "No Preference/Other" 1 "Democrat" 2 "Republican" 3 "Idependent"
label values party_id vallab27
codebook V201228
codebook party_id

gen dem_id = V201228
label variable dem_id "Dem ID dummy (pre)"
replace dem_id=. if V201228==-9 | V201228==-8 | V201228==-4
replace dem_id=0 if V201228==2 | V201228==3 | V201228==5
label values dem_id vallab1
codebook V201228
codebook dem_id

gen rep_id = V201228
label variable rep_id "Rep ID dummy (pre)"
replace rep_id=. if V201228==-9 | V201228==-8 | V201228==-4
replace rep_id=0 if V201228==1 | V201228==3 | V201228==5
replace rep_id=1 if V201228==2
label values rep_id vallab1
codebook V201228
codebook rep_id

*codebook V201228y
///All -2///
*codebook V201228z
///All -2///
*codebook V201229
///Seems like the summary might be more useful to code than this///

codebook V201230
gen party_close = V201230
label variable party_close "If no party ID, closer to dems or reps (pre)"
replace party_close=. if V201230==-9 | V201230==-8 | V201230==-1
replace party_close=1 if V201230==3
replace party_close=3 if V201230==1
label define vallab28 1 "Closer to Democratic" 2 "Neither" 3 "Closer to Republican"
label values party_close vallab28
codebook V201230
codebook party_close

codebook V201231x
gen party_id_7 = V201231x
label variable party_id_7 "7pt Party ID scale (pre)"
replace party_id_7=. if V201231x==-9 | V201231x==-8
label define vallab29 1 "Strong Democrat" 2 "Not very strong Democrat" 3 "Independent-Democrat" 4 "Independent" 5 "Independent-Republican" 6 "Not very strong Republican" 7 "Srong Republican"
label values party_id_7 vallab29
codebook V201231x
codebook party_id_7

codebook V201232
gen id_importance = V201232
label variable id_importance "Party ID importance (pre)"
replace id_importance=. if V201232==-9 | V201232==-8 | V201232==-1
replace id_importance=0 if V201232==5
replace id_importance=1 if V201232==4
replace id_importance=2 if V201232==3
replace id_importance=3 if V201232==2
replace id_importance=4 if V201232==1
label define vallab30 0 "Not at all important" 1 "A little important" 2 "Moderately important" 3 "Very Important" 4 "Extremely important"
label values id_importance vallab30
codebook V201232
codebook id_importance

codebook V201233
gen trust_gov = V201233
label variable trust_gov "How often trust government in Washington to do what is right (pre)"
replace trust_gov=. if V201233==-9 | V201233==-8
replace trust_gov=0 if V201233==5
replace trust_gov=1 if V201233==4
replace trust_gov=2 if V201233==3
replace trust_gov=3 if V201233==2
replace trust_gov=4 if V201233==1
label values trust_gov vallab2
codebook V201233
codebook trust_gov

codebook V201234
gen gov_run = V201234
label variable gov_run "Government run by a few big interests or for benefit of all the people (pre)"
replace gov_run=. if V201234==-9 | V201234==-8
label define vallab31 1 "Run by a few big interests" 2 "For the benefit of all the people"
label values gov_run vallab31
codebook V201234
codebook gov_run

gen interest_run = V201234
label variable interest_run "Gov run by big interests dummy (pre)"
replace interest_run=. if V201234==-9 | V201234==-8
replace interest_run=0 if V201234==2
label values interest_run vallab1
codebook V201234
codebook interest_run

gen all_run = V201234
label variable all_run "Gov run for the benefit of all the people (pre)"
replace all_run=. if V201234==-9 | V201234==-8
replace all_run=1 if V201234==2
replace all_run=0 if V201234==1
label values all_run vallab1
codebook V201234
codebook all_run

codebook V201235
gen waste_tax = V201235
label variable waste_tax "Does government waste much tax money (pre)"
replace waste_tax=. if V201235==-9 | V201235==-8
replace waste_tax=1 if V201235==3
replace waste_tax=3 if V201235==1
label define vallab32 1 "Don't waste very much" 2 "Waste some" 3 "Waste a lot"
label values waste_tax vallab32
codebook V201235
codebook waste_tax

codebook V201236
gen corrupt_prop = V201236
label variable corrupt_prop "How many in government are corrupt (pre)"
replace corrupt_prop=. if V201236==-9 | V201236==-8
replace corrupt_prop=0 if V201236==5
replace corrupt_prop=1 if V201236==4
replace corrupt_prop=2 if V201236==3
replace corrupt_prop=3 if V201236==2
replace corrupt_prop=4 if V201236==1
label define vallab33 0 "None" 1 "A few" 2 "About half" 3 "Most" 4 "All"
label values corrupt_prop vallab33
codebook V201236
codebook corrupt_prop

codebook V201237
gen trust_ppl = V201237
label variable trust_ppl "How often can people be trusted (pre)"
replace trust_ppl=. if V201237==-9 | V201237==-8
replace trust_ppl=0 if V201237==5
replace trust_ppl=1 if V201237==4
replace trust_ppl=2 if V201237==3
replace trust_ppl=3 if V201237==2
replace trust_ppl=4 if V201237==1
label values trust_ppl vallab2
codebook V201237
codebook trust_ppl

codebook V201238
gen election_gov_attn = V201238
label variable election_gov_attn "Elections make government pay attention (pre)"
replace election_gov_attn=. if V201238==-9 | V201238==-8
replace election_gov_attn=1 if V201238==3
replace election_gov_attn=3 if V201238==1
label define vallab34 1 "Not Much" 2 "Some" 3 "A good deal"
label values election_gov_attn vallab34
codebook V201238
codebook election_gov_attn

codebook V201239
gen party_econ = V201239
label variable party_econ "Which party better: handling nations economy (pre)"
replace party_econ=. if V201239==-9 | V201239==-8
label define vallab35 1 "Democrats would do a much better job" 2 "Democrats would do a somewhat better job" 3 "Not much difference between them" 4 "Republicans would do a somewhat better job" 5 "Republicans would do a much better job"
label values party_econ vallab35
codebook V201239
codebook party_econ

codebook V201240
gen party_hlth = V201240
label variable party_hlth "Which party better: handling health care (pre)"
replace party_hlth=. if V201240==-9 | V201240==-8
label values party_hlth vallab35
codebook V201240
codebook party_hlth

codebook V201241
gen party_imm = V201241
label variable party_imm "Which party better: handling immigration (pre)"
replace party_imm=. if V201241==-9 | V201241==-8
label values party_imm vallab35
codebook V201241
codebook party_imm

codebook V201242
gen party_taxes = V201242
label variable party_taxes "Which party better: handling taxes (pre)"
replace party_taxes=. if V201242==-9 | V201242==-8
label values party_taxes vallab35
codebook V201242
codebook party_taxes

codebook V201243
gen party_env = V201243
label variable party_env "Which party better: handling environment (pre)"
replace party_env=. if V201243==-9 | V201243==-8
label values party_env vallab35
codebook V201243
codebook party_env

codebook V201244
gen party_covid = V201244
label variable party_covid "Which party better: handling COVID-19 (pre)"
replace party_covid=. if V201244==-9 | V201244==-8
label values party_covid vallab35
codebook V201244
codebook party_covid
///There is no V201245 for some reason///

codebook V201246
gen service_7 = V201246
label variable service_7 "7pt scale spending and services: self-placement (pre)"
replace service_7=. if V201246==-9 | V201246==99
label define vallab36 1 "Government should provide many fewer services" 7 "Government should provide many more services"
label values service_7 vallab36
codebook V201246
codebook service_7

codebook V201247
gen biden_service = V201247
label variable biden_service "7pt spending and services: Democratic Presidential candidate (pre)"
replace biden_service=. if V201247==-9 | V201247==99
label values biden_service vallab36
codebook V201247
codebook biden_service

codebook V201248
gen trump_service = V201248
label variable trump_service "7pt spending and services: Repblican Presidential candidate (pre)"
replace trump_service=. if V201248==-9 | V201248==-8
label values trump_service vallab36
codebook V201248
codebook trump_service

codebook V201249
gen defense_7 = V201249
label variable defense_7 "7pt scale defense spending: self-placement (pre)"
replace defense_7=. if V201249==-9 | V201249==-8 | V201249==99
label define vallab37 1 "Greatly decrease defense spending" 7 "Greatly increase defesne spending"
label values defense_7 vallab37
codebook V201249
codebook defense_7

codebook V201250
gen biden_defense = V201250
label variable biden_defense "7pt scale defense spending: Democratic Presidential Candidate (pre)"
replace biden_defense=. if V201250==-9 | V201250==-8
label values biden_defense vallab37
codebook V201250
codebook biden_defense

codebook V201251
gen trump_defense = V201251
label variable trump_defense "7pt scale defense spending: Republican Presidential Candidate (pre)"
replace trump_defense=. if V201251==-9 | V201251==-8
label values trump_defense vallab37
codebook V201251
codebook trump_defense

codebook V201252
gen med_ins_7 = V201252
label variable med_ins_7 "7pt scale gov-private medicale insurance scale: self-placement (pre)"
replace med_ins_7=. if V201252==-9 | V201252==-8 | V201252==99
label define vallab38 1 "Governmnet insurance plan" 7 "Private insurance plan"
label values med_ins_7 vallab38
codebook V201252
codebook med_ins_7

codebook V201253
gen biden_med_ins = V201253
label variable biden_med_ins "7pt scale gov-private medical insurance scale: Dem Presidential candidate (pre)"
replace biden_med_ins=. if V201253==-9 | V201253==-8
label values biden_med_ins vallab38
codebook V201253
codebook biden_med_ins

codebook V201254
gen trump_med_ins = V201254
label variable trump_med_ins "7pt scale gov_private medical insurance scale: Rep Preidential candidate (pre)"
replace trump_med_ins=. if V201254==-9 | V201254==-8
label values trump_med_ins vallab38
codebook V201254
codebook trump_med_ins

codebook V201255
gen jobs_req_7 = V201255
label variable jobs_req_7 "7pt scale guaranteed job-income scale: self placement (pre)"
replace jobs_req_7=. if V201255==-9 | V201255==-8 | V201255==99
label define vallab39 1 "Gov should see to jobs & std of living" 7 "gov should let each person get ahead on own"
label values jobs_req_7 vallab39
codebook V201255
codebook jobs_req_7

codebook V201256
gen biden_jobs_req = V201256
label variable biden_jobs_req "7pt scale guaranteed job-income scale: dem presidential candidate (pre)"
replace biden_jobs_req=. if V201256==-9 | V201256==-8
label values biden_jobs_req vallab39
codebook V201256
codebook biden_jobs_req

codebook V201257
gen trump_jobs_req = V201257
label variable trump_jobs_req "7pt scale guaranteed job-income scale: rep presidential candidate (pre)"
replace trump_jobs_req=. if V201257==-9 | V201257==-8
label values trump_jobs_req vallab39
codebook V201257
codebook trump_jobs_req

codebook V201258
gen assist_blacks_7 = V201258
label variable assist_blacks_7 "7pt scale gov assistance to blacks scale: self-placement (pre)"
replace assist_blacks_7=. if V201258==-9 | V201258==-8 | V201258==99
label define vallab40 1 "Gov should help blacks" 7 "Blacks should help themselves"
label values assist_blacks_7 vallab40
codebook V201258
codebook assist_blacks_7

codebook V201259
gen biden_assist_blacks = V201259
label variable biden_assist_blacks "7pt scale gov assistance to blacks scale: Dem Presidential candidate (pre)"
replace biden_assist_blacks=. if V201259==-9 | V201259==-8
label values biden_assist_blacks vallab40
codebook V201259
codebook biden_assist_blacks

codebook V201260
gen trump_assist_blacks = V201260
label variable trump_assist_blacks "7pt scale gov assistance to blacks scale: Rep Presidential candidate (pre)"
replace trump_assist_blacks=. if V201260==-9 | V201260==-8
label values trump_assist_blacks vallab40
codebook V201260
codebook trump_assist_blacks
///For some reason, there is no V201261///

codebook V201262
gen env_bus_7 = V201262
label variable env_bus_7 "7pt scale environment-business tradeoff: self-placement (pre)"
replace env_bus_7=. if V201262==-9 | V201262==-8 | V201262==99
label define vallab41 1 "Tougher regulations on business needed to protect environment" 7 "Regulations to protect environment already too much a burden on business"
label values env_bus_7 vallab41
codebook V201262
codebook env_bus_7

codebook V201263
gen biden_env_bus = V201263
label variable biden_env_bus "7pt scale environment-business tradeoff: dem presidential candidate (pre)"
replace biden_env_bus=. if V201263==-9 | V201263==-8
label values biden_env_bus vallab41
codebook V201263
codebook biden_env_bus

codebook V201264
gen trump_env_bus = V201264
label variable trump_env_bus "7pt scale environment-business tradeoff: Rep Pres candidate (pre)"
replace trump_env_bus=. if V201264==-9 | V201264==-8
label values trump_env_bus vallab41
codebook V201264
codebook trump_env_bus

codebook V201300
gen soc_sec_spend = V201300
label variable soc_sec_spend "Federal Budget Spending: Social Security (pre)"
replace soc_sec_spend=. if V201300==-9 | V201300==-8
replace soc_sec_spend=1 if V201130==2
replace soc_sec_spend=2 if V201300==3
replace soc_sec_spend=3 if V201300==1
label define vallab42 1 "Decreased" 2 "Kept the same" 3 "Increased"
label values soc_sec_spend vallab42
codebook V201300
codebook soc_sec_spend


codebook V201302x
gen soc_sec_sum = V201302x
label variable soc_sec_sum "Summary: Social Security spending (pre)"
replace soc_sec_sum=. if V201302x==-2
replace soc_sec_sum=1 if V201302x==5
replace soc_sec_sum=2 if V201302x==4
replace soc_sec_sum=4 if V201302x==2
replace soc_sec_sum=5 if V201302x==1
label define vallab43 1 "Decreased a lot" 2 "Decreased a little" 3 "Kept the same" 4 "Increased a little" 5 "Increased a lot"
label values soc_sec_sum vallab43
codebook V201302x
codebook soc_sec_sum

codebook V201303
gen pub_sch_spend = V201303
label variable pub_sch_spend "Federal Budget Spending: public schools (pre)"
replace pub_sch_spend=. if V201303==-9 | V201303==-8
replace pub_sch_spend=1 if V201303==2
replace pub_sch_spend=2 if V201303==3
replace pub_sch_spend=3 if V201303==1
label values pub_sch_spend vallab42
codebook V201303
codebook pub_sch_spend

codebook V201305x
gen pub_sch_sum = V201305x
label variable pub_sch_sum "Summary: public schools spending (pre)"
replace pub_sch_sum=. if V201305x==-2
replace pub_sch_sum=1 if V201305x==5
replace pub_sch_sum=2 if V201305x==4
replace pub_sch_sum=4 if V201305x==2
replace pub_sch_sum=5 if V201305x==1
label values pub_sch_sum vallab43
codebook V201305x
codebook pub_sch_sum

codebook V201306
gen border_sec_spend = V201306
label variable border_sec_spend "Federal Budget Spending: tightening border security (pre)"
replace border_sec_spend=. if V201306==-9 | V201306==-8
replace border_sec_spend=1 if V201306==2
replace border_sec_spend=2 if V201306==3
replace border_sec_spend=3 if V201306==1
label values border_sec_spend vallab42
codebook V201306
codebook border_sec_spend

codebook V201308x
gen border_sec_sum = V201308x
label variable border_sec_sum "Summary: tightening border security (pre)"
replace border_sec_sum=. if V201308x==-2
replace border_sec_sum=1 if V201308x==5
replace border_sec_sum=2 if V201308x==4
replace border_sec_sum=4 if V201308x==2
replace border_sec_sum=5 if V201308x==1
label values border_sec_sum vallab43
codebook V201308x
codebook border_sec_sum

codebook V201309
gen crime_spend = V201309
label variable crime_spend "Federal Budget spending: dealing with crime (pre)"
replace crime_spend=. if V201309==-9 | V201309==-8
replace crime_spend=1 if V201309==2
replace crime_spend=2 if V201309==3
replace crime_spend=3 if V201309==1
label values crime_spend vallab42
codebook V201309
codebook crime_spend

codebook V201311x
gen crime_spend_sum = V201311x
label variable crime_spend_sum "Summary: dealing with crime spending (pre)"
replace crime_spend_sum=. if V201311x==-2
replace crime_spend_sum=1 if V201311x==5
replace crime_spend_sum=2 if V201311x==4
replace crime_spend_sum=4 if V201311x==2
replace crime_spend_sum=5 if V201311x==1
label values crime_spend_sum vallab43
codebook V201311x
codebook crime_spend_sum

codebook V201312
gen welfare_spend = V201312
label variable welfare_spend "Federal Budget Spending: welfare programs (pre)"
replace welfare_spend=. if V201312==-9 | V201312==-8
replace welfare_spend=1 if V201312==2
replace welfare_spend=2 if V201312==3
replace welfare_spend=3 if V201312==1
label values welfare_spend vallab42
codebook V201312
codebook welfare_spend

codebook V201314x
gen welfare_spend_sum = V201314x
label variable welfare_spend_sum "Summary: welfare programs (pre)"
replace welfare_spend_sum=. if V201314x==-2
replace welfare_spend_sum=1 if V201314x==5
replace welfare_spend_sum=2 if V201314x==4
replace welfare_spend_sum=4 if V201314x==2
replace welfare_spend_sum=5 if V201314x==1
label values welfare_spend_sum vallab43
codebook V201314x
codebook welfare_spend_sum

codebook V201315
gen highway_spend = V201315
label variable highway_spend "Federal Budget Spending: building and repairing highways (pre)"
replace highway_spend=. if V201315==-9 | V201315==-8
replace highway_spend=1 if V201315==2
replace highway_spend=2 if V201315==3
replace highway_spend=3 if V201315==1
label values highway_spend vallab42
codebook V201315
codebook highway_spend

codebook V201317x
gen highway_spend_sum = V201317x
label variable highway_spend_sum "Summary: building and repairing highways (pre)"
replace highway_spend_sum=. if V201317x==-2
replace highway_spend_sum=1 if V201317x==5
replace highway_spend_sum=2 if V201317x==4
replace highway_spend_sum=4 if V201317x==2
replace highway_spend_sum=5 if V201317x==1
label values highway_spend_sum vallab43
codebook V201317x
codebook highway_spend_sum

codebook V201318
gen poor_spend = V201318
label variable poor_spend "Federal Budget Spending: aid to the poor (pre)"
replace poor_spend=. if V201318==-9 | V201318==-8
replace poor_spend=1 if V201318==2
replace poor_spend=2 if V201318==3
replace poor_spend=3 if V201318==1
label values poor_spend vallab42
codebook V201318
codebook poor_spend

codebook V201319
codebook V201320x
gen poor_spend_sum = V201320x
label variable poor_spend_sum "Summary: aid to the poor (pre)"
replace poor_spend_sum=. if V201320x==-2
replace poor_spend_sum=1 if V201320x==5
replace poor_spend_sum=2 if V201320x==4
replace poor_spend_sum=4 if V201320x==2
replace poor_spend_sum=5 if V201320x==1
label values poor_spend_sum vallab43
codebook V201320x
codebook poor_spend_sum

codebook V201321
gen envmt_spend = V201321
label variable envmt_spend "Federal Budget Spending: protecting the environment (pre)"
replace envmt_spend=. if V201321==-9 | V201321==-8
replace envmt_spend=1 if V201321==2
replace envmt_spend=2 if V201321==3
replace envmt_spend=3 if V201321==1
label values envmt_spend vallab42
codebook V201321
codebook envmt_spend

codebook V201323x
gen envmt_spend_sum = V201323x
label variable envmt_spend_sum "Summary: protecting the environment (pre)"
replace envmt_spend_sum=. if V201323x==-2
replace envmt_spend_sum=1 if V201323x==5
replace envmt_spend_sum=2 if V201323x==4
replace envmt_spend_sum=4 if V201323x==2
replace envmt_spend_sum=5 if V201323x==1
label values envmt_spend_sum vallab43
codebook V201323x
codebook envmt_spend_sum

codebook V201324
gen econ_eval = V201324
label variable econ_eval "Current economy good or bad (pre)"
replace econ_eval=. if V201324==-9 | V201324==-8
replace econ_eval=1 if V201324==5
replace econ_eval=2 if V201324==4
replace econ_eval=4 if V201324==2
replace econ_eval=5 if V201324==1
label define vallab44 1 "Very Bad" 2 "Bad" 3 "Neither good nor bad" 4 "Good" 5 "Very good"
label values econ_eval vallab44
codebook V201324
codebook econ_eval

codebook V201325
gen econ_last_year = V201325
label variable econ_last_year "National economy better or worse in last year (pre)"
replace econ_last_year=. if V201325==-9 | V201325==-8
replace econ_last_year=1 if V201325==3
replace econ_last_year=3 if V201325==1
label define vallab45 1 "Worse" 2 "Stay about the same" 3 "Better"
label values econ_last_year vallab45
codebook V201325
codebook econ_last_year

codebook V201327x
gen econ_last_year_sum = V201327x
label variable econ_last_year_sum "Summary: Ntl Economy beter or worse in last year (pre)"
replace econ_last_year_sum=. if V201327x==-2
replace econ_last_year_sum=1 if V201327x==5
replace econ_last_year_sum=2 if V201327x==4
replace econ_last_year_sum=4 if V201327x==2
replace econ_last_year_sum=5 if V201327x==1
label define vallab46 1 "Much worse" 2 "Somewhat worse" 3 "Stay about the same" 4 "Somewhat better" 5 "Much better"
label values econ_last_year_sum vallab46
codebook V201327x
codebook econ_last_year_sum

codebook V201328
gen econ_next_yr = V201328
label variable econ_next_yr "Economy better or worse in next 12 months (pre)"
replace econ_next_yr=. if V201328==-9 | V201328==-8
replace econ_next_yr=1 if V201328==3
replace econ_next_yr=3 if V201328==1
label values econ_next_yr vallab45
codebook V201328
codebook econ_next_yr

codebook V201330x
gen econ_next_yr_sum = V201330x
label variable econ_next_yr_sum "Summary: economy better or worse in next 12 months (pre)"
replace econ_next_yr_sum=. if V201330x==-2
replace econ_next_yr_sum=1 if V201330x==5
replace econ_next_yr_sum=2 if V201330x==4
replace econ_next_yr_sum=4 if V201330x==2
replace econ_next_yr_sum=5 if V201330x==1
label values econ_next_yr_sum vallab46
codebook V201330x
codebook econ_next_yr_sum

codebook V201331
gen unemp_last_yr = V201331
label variable unemp_last_yr "Unemployment better or worse in last year (pre)"
replace unemp_last_yr=. if V201331==-9 | V201331==-8
replace unemp_last_yr=1 if V201331==3
replace unemp_last_yr=3 if V201331==1
label values unemp_last_yr vallab45
codebook V201331
codebook unemp_last_yr

codebook V201333x
gen unemp_lastyr_sum = V201333x
label variable unemp_lastyr_sum "Summary: unemployment beter or worse in last year (pre)"
replace unemp_lastyr_sum=. if V201333x==-2
replace unemp_lastyr_sum=1 if V201333x==5
replace unemp_lastyr_sum=2 if V201333x==4
replace unemp_lastyr_sum=4 if V201333x==2
replace unemp_lastyr_sum=5 if V201333x==1
label values unemp_lastyr_sum vallab46
codebook V201333x
codebook unemp_lastyr_sum

codebook V201334
gen unemp_eval = V201334
label variable unemp_eval "More or less unemployment in next year (pre)"
replace unemp_eval=. if V201334==-9 | V201334==-8
replace unemp_eval=1 if V201334==3
replace unemp_eval=3 if V201334==1
label define vallab47 1 "Less" 2 "About the same" 3 "More"
label values unemp_eval vallab47
codebook V201334
codebook unemp_eval

codebook V201335
gen econ_worry = V201335
label variable econ_worry "How worried about national economy (pre)"
replace econ_worry=. if V201335==-9 | V201335==-8
replace econ_worry=0 if V201335==1
replace econ_worry=1 if V201335==2
replace econ_worry=2 if V201335==3
replace econ_worry=3 if V201335==4
replace econ_worry=4 if V201335==5
label define vallab48 0 "Not at all worried" 1 "A little worried" 2 "Moderately worried" 3 "Very worried" 4 "Extremely worried"
label values econ_worry vallab48
codebook V201335
codebook econ_worry

codebook V201336
gen abortion_self = V201336
label variable abortion_self "STD Abortion: self placement (pre)"
replace abortion_self=. if V201336==-9 | V201336==-8
replace abortion_self=0 if V201336==1
replace abortion_self=1 if V201336==2
replace abortion_self=2 if V201336==3
replace abortion_self=3 if V201336==4
replace abortion_self=4 if V201336==5
label define vallab49 0 "Abortion should never be permitted by law" 1 "The law should permit abortion only in case of rape, incest, or when life in danger" 2 "law should permit abortion in other cases, but the need must be established" 3 "A woman should always be able to obtain abortion as a matter of personal choice" 4 "Other"
label values abortion_self vallab49
codebook V201336
codebook abortion_self

codebook V201336z
///All -2///

codebook V201337
gen abortion_importance = V201337
label variable abortion_importance "Importance of abortion issue to R (pre)"
replace abortion_importance=. if V201337==-9 | V201337==-8
replace abortion_importance=0 if V201337==1
replace abortion_importance=1 if V201337==2
replace abortion_importance=2 if V201337==3
replace abortion_importance=3 if V201337==4
replace abortion_importance=4 if V201337==5
label define vallab50 0 "Not at all important" 1 "Not too important" 2 "Somewhat important" 3 "Very important" 4 "Extremely important"
label values abortion_importance vallab50
codebook V201337
codebook abortion_importance

codebook V201338
gen biden_abortion = V201338
label variable biden_abortion "STD Abortion: Democratic Presidential Candidate placement"
replace biden_abortion=. if V201338==-9 | V201338==-8
replace biden_abortion=0 if V201338==1
replace biden_abortion=1 if V201338==2
replace biden_abortion=2 if V201338==3
replace biden_abortion=3 if V201338==4
replace biden_abortion=4 if V201338==5
label values biden_abortion vallab50
codebook V201338
codebook biden_abortion

codebook V201339
gen trump_abortion = V201339
label variable trump_abortion "STD Abortion: Republican Presidential candidate placement (pre)"
replace trump_abortion=. if V201339==-9 | V201339==-8
replace trump_abortion=0 if V201339==1
replace trump_abortion=1 if V201339==2
replace trump_abortion=2 if V201339==3
replace trump_abortion=3 if V201339==4
label values trump_abortion vallab50
codebook V201339
codebook trump_abortion

codebook V201340
gen abortion_scotus = V201340
label variable abortion_scotus "Abortion Rights Supreme Court (pre)"
replace abortion_scotus=. if V201340==-9 | V201340==-8
replace abortion_scotus=1 if V201340==2
replace abortion_scotus=2 if V201340==3
replace abortion_scotus=3 if V201340==1
label define vallab51 1 "Upset" 2 "Neither pleased not upset" 3 "Pleased"
label values abortion_scotus vallab51
codebook V201340
codebook abortion_scotus

codebook V201342x
gen abortion_scotus_sum = V201342x
label variable abortion_scotus_sum "Summary: Abortion rights Supreme Court (pre)"
replace abortion_scotus_sum=. if V201342x==-2
replace abortion_scotus_sum=1 if V201342x==7
replace abortion_scotus_sum=2 if V201342x==6
replace abortion_scotus_sum=3 if V201342x==5
replace abortion_scotus_sum=5 if V201342x==3
replace abortion_scotus_sum=6 if V201342x==2
replace abortion_scotus_sum=7 if V201342x==1
label define vallab52 1 "Extremely Upset" 2 "Moderately upset" 3 "A little upset" 4 "Neither pleased nor upset" 5 "A little pleased" 6 "Moderately pleased" 7 "Extremely plesed"
label values abortion_scotus_sum vallab52
codebook V201342x
codebook abortion_scotus_sum

codebook V201343
gen death_pen = V201343
label variable death_pen "R favor or oppose death penalty (pre) (yes=favor)"
replace death_pen=. if V201343==-9 | V201343==-8
replace death_pen=0 if V201343==2
label values death_pen vallab1
codebook V201343
codebook death_pen

codebook V201345x
gen death_pen_sum = V201345x
label variable death_pen_sum "Summary: R favor/oppose death penalty (pre)"
replace death_pen_sum=. if V201345x==-2
replace death_pen_sum=1 if V201345x==4
replace death_pen_sum=2 if V201345x==3
replace death_pen_sum=3 if V201345x==2
replace death_pen_sum=4 if V201345x==1
label define vallab53 1 "Oppose strongly" 2 "Oppose not strongly" 3 "Favor not strongly" 4 "Favor Strongly"
label values death_pen_sum vallab53
codebook V201345x
codebook death_pen_sum

codebook V201346
gen world_pos = V201346
label variable world_pos "During last year, US position in world weaker or stronger (pre)"
replace world_pos=. if V201346==-9 | V201346==-8
label define vallab54 1 "Weaker" 2 "Stay about the same" 3 "Stronger"
label values world_pos vallab54
codebook V201346
codebook world_pos

codebook V201347
gen stay_home = V201347
label variable stay_home "Country would be better off if we just stayed home (yes=agree) (pre)"
replace stay_home=. if V201347==-9 | V201347==-8
replace stay_home=0 if V201347==2
label values stay_home vallab1
codebook V201347
codebook stay_home

codebook V201349x
gen stay_home_sum = V201349x
label variable stay_home_sum "Summary: country would be better off if we ust stayed home (pre)"
replace stay_home_sum=. if V201349x==-2
replace stay_home_sum=1 if V201349x==4
replace stay_home_sum=2 if V201349x==3
replace stay_home_sum=3 if V201349x==2
replace stay_home_sum=4 if V201349x==1
label define vallab55 1 "Disagree strongly" 2 "Disagree somewhat" 3 "Agree somewhat" 4 "Agree somewhat"
label values stay_home_sum vallab55
codebook V201349x
codebook stay_home_sum

codebook V201350
gen force_international = V201350
label variable force_international "Force to solve international problems (pre)"
replace force_international=. if V201350==-9 | V201350==-8
replace force_international=0 if V201350==5
replace force_international=1 if V201350==4
replace force_international=2 if V201350==3
replace force_international=3 if V201350==2
replace force_international=4 if V201350==1
label define vallab56 0 "Not at all willing" 1 "A little willing" 2 "Moderately willing" 3 "Very willing" 4 "Extremely willing"
label values force_international vallab56
codebook V201350
codebook force_international

codebook V201351
gen count_accurate = V201351
label variable count_accurate "Votes Counted Accurately (pre)"
replace count_accurate=. if V201351==-9 | V201351==-8
replace count_accurate=0 if V201351==1
replace count_accurate=1 if V201351==2
replace count_accurate=2 if V201351==3
replace count_accurate=3 if V201351==4
replace count_accurate=4 if V201351==5
label define vallab57 0 "Not at all accurately" 1 "A little accurately" 2 "Moderately accurately" 3 "Very accurately" 4 "Completely accurately"
label values count_accurate vallab57
codebook V201351
codebook count_accurate

codebook V201352
gen trust_officials = V201352
label variable trust_officials "Trust election officials (pre)"
replace trust_officials=. if V201352==-9 | V201352==-8
replace trust_officials=0 if V201352==1
replace trust_officials=1 if V201352==2
replace trust_officials=2 if V201352==3
replace trust_officials=3 if V201352==4
replace trust_officials=4 if V201352==5
label define vallab58 0 "Not at all" 1 "A little" 2 "A moderate amount" 3 "A lot" 4 "A great deal"
label values trust_officials vallab58
codebook V201352
codebook trust_officials

codebook V201353
gen denied_freq = V201353
label variable denied_freq "How often people denied right to vote (pre)"
replace denied_freq=. if V201353==-9 | V201353==-8
replace denied_freq=0 if V201353==1
replace denied_freq=1 if V201353==2
replace denied_freq=2 if V201353==3
replace denied_freq=3 if V201353==4
replace denied_freq=4 if V201353==5
label define vallab59 0 "Never" 1 "Rarely" 2 "Occasionally" 3 "Fairly often" 4 "Very often"
label values denied_freq vallab59
codebook V201353
codebook denied_freq

codebook V201354
gen mail_opinion = V201354
label variable mail_opinion "Favor or oppose vote by mail (pre)"
replace mail_opinion=. if V201354==-9 | V201354==-8
replace mail_opinion=1 if V201354==2
replace mail_opinion=2 if V201354==3
replace mail_opinion=3 if V201354==1
label define vallab60 1 "Oppose" 2 "Neither favor nor oppose" 3 "Favor"
label values mail_opinion vallab60
codebook V201354
codebook mail_opinion

codebook V201356x
gen mail_opinion_sum = V201356x
label variable mail_opinion_sum "Summary: Favor/Oppose vote by mail (pre)"
replace mail_opinion_sum=. if V201356x==-2
replace mail_opinion_sum=1 if V201356x==7
replace mail_opinion_sum=2 if V201356x==6
replace mail_opinion_sum=3 if V201356x==5
replace mail_opinion_sum=5 if V201356x==3
replace mail_opinion_sum=6 if V201356x==2
replace mail_opinion_sum=7 if V201356x==1
label define vallab61 1 "Oppose a great deal" 2 "Oppose moderately" 3 "Oppose a little" 4 "Neither favor nor oppose" 5 "Favor a little" 6 "Favor moderately" 7 "Favor a great deal"
label values mail_opinion_sum vallab61
codebook V201356x
codebook mail_opinion_sum

codebook V201357
gen id_opinion = V201357
label variable id_opinion "Favor or oppose requiring ID when voting (pre)"
replace id_opinion=. if V201357==-9 | V201357==-8
replace id_opinion=1 if V201357==2
replace id_opinion=2 if V201357==3
replace id_opinion=3 if V201357==1
label values id_opinion vallab60
codebook V201357
codebook id_opinion

codebook V201359x
gen id_op_sum = V201359x
label variable id_op_sum "Summary: favor/oppose requiring ID when voting (pre)"
replace id_op_sum=. if V201359x==-2
replace id_op_sum=1 if V201359x==7
replace id_op_sum=2 if V201359x==6
replace id_op_sum=3 if V201359x==5
replace id_op_sum=5 if V201359x==3
replace id_op_sum=6 if V201359x==2
replace id_op_sum=7 if V201359x==1
label values id_op_sum vallab61
codebook V201359x
codebook id_op_sum

codebook V201360
gen felon_vote = V201360
label variable felon_vote "Favor or oppose allowing felons to vote (pre)"
replace felon_vote=. if V201360==-9 | V201360==-8
replace felon_vote=1 if V201360==2
replace felon_vote=2 if V201360==3
replace felon_vote=3 if V201360==1
label values felon_vote vallab60
codebook V201360
codebook felon_vote

codebook V201362x
gen felon_vote_sum = V201362x
label variable felon_vote_sum "Summary: favor/oppose allowing felons to vote (pre)"
replace felon_vote_sum=. if V201362x==-2
replace felon_vote_sum=1 if V201362x==7
replace felon_vote_sum=2 if V201362x==6
replace felon_vote_sum=3 if V201362x==5
replace felon_vote_sum=5 if V201362x==3
replace felon_vote_sum=6 if V201362x==2
replace felon_vote_sum=7 if V201362x==1
label values felon_vote_sum vallab61
codebook V201362x
codebook felon_vote_sum

codebook V201363
gen state_id = V201363
label variable state_id "Does R's state ask for ID to vote dummy (pre)"
///I decided to put the unsure category under missing///
replace state_id=. if V201363==-9 | V201363==-8 | V201363==3
replace state_id=0 if V201363==2
label values state_id vallab1
codebook V201363
codebook state_id

codebook V201364
gen photo_id = V201364
label variable photo_id "Is R required to show photo ID to vote (pre)"
replace photo_id=. if V201364==-9 | V201364==-8 | V201364==-1
replace photo_id=1 if V201364==3
replace photo_id=3 if V201364==1
label define vallab62 1 "Unsure" 2 "Other forms of ID are acceptable" 3 "Must be photo ID"
label values photo_id vallab62
codebook V201364
codebook photo_id

codebook V201365
gen election_options = V201365
label variable election_options "Options for election if COVID-19 continues (pre)"
replace election_options=. if V201365==-9 | V201365==-8
label define vallab63 1 "Delay the election" 2 "Have all voters mail in ballots" 3 "Proceed with in-person voting, but require social distancing at locations" 4 "Proceed as normal with no extra precautions"
label values election_options vallab63
codebook V201365
codebook election_options

codebook V201366
gen free_news = V201366
label variable free_news "How important that news organizations free to criticize (pre)"
replace free_news=. if V201366==-9 | V201366==-8
replace free_news=0 if V201366==1
replace free_news=1 if V201366==2
replace free_news=2 if V201366==3
replace free_news=3 if V201366==4
replace free_news=4 if V201366==5
label define vallab64 0 "Not important at all" 1 "A little important" 2 "Moderately important" 3 "Very important" 4 "Extremely important"
label values free_news vallab64
codebook V201366
codebook free_news

codebook V201367
gen federalism_imp = V201367
label variable federalism_imp "How importnat branches of government keep one another from too much power (pre)"
replace federalism_imp=. if V201367==-9 | V201367==-8
replace federalism_imp=0 if V201367==1
replace federalism_imp=1 if V201367==2
replace federalism_imp=2 if V201367==3
replace federalism_imp=3 if V201367==4
replace federalism_imp=4 if V201367==5
label values federalism_imp vallab64
codebook V201367
codebook federalism_imp

codebook V201368
gen consequences_imp = V201368
label variable consequences_imp "How important elected officials face serious consequences for misconduct (pre)"
replace consequences_imp=. if V201368==-9 | V201368==-8
replace consequences_imp=0 if V201368==1
replace consequences_imp=1 if V201368==2
replace consequences_imp=2 if V201368==3
replace consequences_imp=3 if V201368==4
replace consequences_imp=4 if V201368==5
label values consequences_imp vallab64
codebook V201368
codebook consequences_imp

codebook V201369
gen common_truth_imp = V201369
label variable common_truth_imp "How important that people agree on basic facts (pre)"
replace common_truth_imp=. if V201369==-9 | V201369==-8
replace common_truth_imp=0 if V201369==1
replace common_truth_imp=1 if V201369==2
replace common_truth_imp=2 if V201369==3
replace common_truth_imp=3 if V201369==4
replace common_truth_imp=4 if V201369==5
label values common_truth_imp vallab64
codebook V201369
codebook common_truth_imp

codebook V201370
gen pres_sole_power = V201370
label variable pres_sole_power "Helpful or harmful is Pres didn't hae to worry about Congress/Courts (pre)"
replace pres_sole_power=. if V201370==-9 | V201370==-8
replace pres_sole_power=1 if V201370==2
replace pres_sole_power=2 if V201370==3
replace pres_sole_power=3 if V201370==1
label define vallab65 1 "Harmful" 2 "Neither helpful nor harmful" 3 "Helpful"
label values pres_sole_power vallab65
codebook V201370
codebook pres_sole_power

codebook V201372x
gen pres_sole_power_sum = V201372x
label variable pres_sole_power_sum "Summary: helpful/harmful if Pres didn't have to worry about congress/courts (pre)"
replace pres_sole_power_sum=. if V201372x==-2
replace pres_sole_power_sum=1 if V201372x==7
replace pres_sole_power_sum=2 if V201372x==6
replace pres_sole_power_sum=3 if V201372x==5
replace pres_sole_power_sum=5 if V201372x==3
replace pres_sole_power_sum=6 if V201372x==2
replace pres_sole_power_sum=7 if V201372x==1
label define vallab66 1 "Extremely harmful" 2 "Moderately harmful" 3 "A little harmful" 4 "neither helpful nor harmful" 5 "A little helpful" 6 "Moderately helpful" 7 "Extremely helpful"
label values pres_sole_power_sum vallab66
codebook V201372x
codebook pres_sole_power_sum

codebook V201373
gen restrict_journo = V201373
label variable restrict_journo "Favor or oppose restricting jouranlist access (pre)"
replace restrict_journo=. if V201373==-9 | V201373==-8
replace restrict_journo=1 if V201373==2
replace restrict_journo=2 if V201373==3
replace restrict_journo=3 if V201373==1
label values restrict_journo vallab60
codebook V201373
codebook restrict_journo

codebook V201375x
gen restrict_journo_sum = V201375x
label variable restrict_journo_sum "Summary: favor/oppose restricting journalist access (pre)"
replace restrict_journo_sum=. if V201375x==-2
replace restrict_journo_sum=1 if V201375x==7
replace restrict_journo_sum=2 if V201375x==6
replace restrict_journo_sum=3 if V201375x==5
replace restrict_journo_sum=5 if V201375x==3
replace restrict_journo_sum=6 if V201375x==2
replace restrict_journo_sum=7 if V201375x==1
label values restrict_journo_sum vallab61
codebook V201375x
codebook restrict_journo_sum

codebook V201376
gen undermine_media = V201376
label variable undermine_media "How concerned government might undermine media (pre)"
replace undermine_media=. if V201376==-9 | V201376==-8
replace undermine_media=0 if V201376==1
replace undermine_media=1 if V201376==2
replace undermine_media=2 if V201376==3
replace undermine_media=3 if V201376==4
replace undermine_media=4 if V201376==5
label define vallab67 0 "Not at all concerned" 1 "A little concerned" 2 "Moderately concerned" 3 "Very concerned" 4 "Extremely concerned"
label values undermine_media vallab67
codebook V201376
codebook undermine_media

codebook V201377
gen trust_news = V201377
label variable trust_news "How much trust in news media (pre)"
replace trust_news=. if V201377==-9 | V201377==-8
replace trust_news=0 if V201377==1
replace trust_news=1 if V201377==2
replace trust_news=2 if V201377==3
replace trust_news=3 if V201377==4
replace trust_news=4 if V201377==5
label define vallab68 0 "None" 1 "A little" 2 "A moderate amount" 3 "A lot" 4 "A great deal"
label values trust_news vallab68
codebook V201377
codebook trust_news

codebook V201378
gen foreign_investigate = V201378
label variable foreign_investigate "Appropriate/inappropriate Pres ask foreign countries to investiage rivals (pre)"
replace foreign_investigate=. if V201378==-9 | V201378==-8
replace foreign_investigate=1 if V201378==5
replace foreign_investigate=2 if V201378==4
replace foreign_investigate=4 if V201378==2
replace foreign_investigate=5 if V201378==1
label define vallab69 1 "Very inappropriate" 2 "Somemwhat inappropriate" 3 "Neither appropriate nor inappropriate" 4 "Somewhat appropriate" 5 "Very appropriate"
label values foreign_investigate vallab69
codebook V201378
codebook foreign_investigate

codebook V201379
gen prefer_compromise = V201379
label variable prefer_compromise "Prefer gov official who compromises than sticks to principles dummy (pre)"
replace prefer_compromise=. if V201379==-9 | V201379==-8
replace prefer_compromise=0 if V201379==2
label values prefer_compromise vallab1
codebook V201379
codebook prefer_compromise

gen prefer_principles = V201379
label variable prefer_principles "Prefer gov official who sticks to principles over compromise dummy (pre)"
replace prefer_principles=. if V201379==-9 | V201379==-8
replace prefer_principles=1 if V201379==2
replace prefer_principles=0 if V201379==1
label values prefer_principles vallab1
codebook V201379
codebook prefer_principles

codebook V201380
gen corruption_change = V201380
label variable corruption_change "Corruption increased or decreased since Trump (pre)"
replace corruption_change=. if V201380==-9 | V201380==-8
replace corruption_change=1 if V201380==2
replace corruption_change=2 if V201380==3
replace corruption_change=3 if V201380==1
label values corruption_change vallab42
codebook V201380
codebook corruption_change

codebook V201382x
gen corruption_change_sum = V201382x
label variable corruption_change_sum "Summary: corruption increased or decreased since Trump (pre)"
replace corruption_change_sum=. if V201382x==-2
replace corruption_change_sum=1 if V201382x==7
replace corruption_change_sum=2 if V201382x==6
replace corruption_change_sum=3 if V201382x==5
replace corruption_change_sum=5 if V201382x==3
replace corruption_change_sum=6 if V201382x==2
replace corruption_change_sum=7 if V201382x==1
label define vallab70 1 "Decreased a great deal" 2 "Decreased a moderate amount" 3 "Decreased a little" 4 "Stayed the same" 5 "Increased a little" 6 "Increased a moderate amount" 7 "Increased a great deal"
label values corruption_change_sum vallab159
codebook V201382x
codebook corruption_change_sum

codebook V201383
gen ukraine = V201383
label variable ukraine "Did Trump ask Ukraine to investigate rivals (pre)"
replace ukraine=. if V201383==-9 | V201383==-8 | V201383==3
///I put "Not sure" under missing so that the question would be a dummy. If I should change this, let me know.///
replace ukraine=0 if V201383==2
label values ukraine vallab1
codebook V201383
codebook ukraine

codebook V201384
gen impeachment_op = V201384
label variable impeachment_op "Favor or oppose House impeachment decision (pre)"
replace impeachment_op=. if V201384==-9 | V201384==-8
replace impeachment_op=1 if V201384==2
replace impeachment_op=2 if V201384==3
replace impeachment_op=3 if V201384==1
label values impeachment_op vallab60
codebook V201384
codebook impeachment_op

codebook V201386x
gen impeachment_op_sum = V201386x
label variable impeachment_op_sum "Summary: favor or oppose House impeachment decision (pre)"
replace impeachment_op_sum=. if V201386x==-2
replace impeachment_op_sum=1 if V201386x==7
replace impeachment_op_sum=2 if V201386x==6
replace impeachment_op_sum=3 if V201386x==5
replace impeachment_op_sum=5 if V201386x==3
replace impeachment_op_sum=6 if V201386x==2
replace impeachment_op_sum=7 if V201386x==1
label values impeachment_op_sum vallab61
codebook V201386x
codebook impeachment_op_sum

codebook V201387
gen acquittal_op = V201387
label variable acquittal_op "Favor or oppose Senate acquittal decision (pre)"
replace acquittal_op=. if V201387==-9 | V201387==-8
replace acquittal_op=1 if V201387==2
replace acquittal_op=2 if V201387==3
replace acquittal_op=3 if V201387==1
label values acquittal_op vallab60
codebook V201387
codebook acquittal_op

codebook V201389x
gen acquittal_sum = V201389x
label variable acquittal_sum "Summary: favor/oppose Senate acquittal decision (pre)"
replace acquittal_sum=. if V201389x==-2
replace acquittal_sum=1 if V201389x==7
replace acquittal_sum=2 if V201389x==6
replace acquittal_sum=3 if V201389x==5
replace acquittal_sum=5 if V201389x==3
replace acquittal_sum=6 if V201389x==2
replace acquittal_sum=7 if V201389x==1
label values acquittal_sum vallab61
codebook V201389x
codebook acquittal_sum

codebook V201390
gen covid_response = V201390
label variable covid_response "Federal governement response to COVID-19 (pre)"
replace covid_response=. if V201390==-9 | V202390==-8
replace covid_response=3 if V201390==1
replace covid_response=2 if V201390==3
replace covid_response=1 if V201390==2
label define vallab71 1 "Too slow" 2 "About right" 3 "Too quick"
label values covid_response vallab71
codebook V201390
codebook covid_response

codebook V201392x
gen covid_response_sum = V201392x
label variable covid_response_sum "Summary: Federal governent response to COVID-19 (pre)"
replace covid_response_sum=. if V201392x==-2
replace covid_response_sum=1 if V201392x==5
replace covid_response_sum=2 if V201392x==4
replace covid_response_sum=4 if V201392x==2
replace covid_response_sum=5 if V201392x==1
label define vallab72 1 "Much too slow" 2 "Somewhat too slow" 3 "About right" 4 "Somewhat too quick" 5 "Much too quick"
label values covid_response_sum vallab72
codebook V201392x
codebook covid_response_sum

codebook V201393
gen strict_limits = V201393
label variable strict_limits "Limits placed on public activitiy due to covid-19 too strict or not (pre)"
replace strict_limits=. if V201393==-9 | V201393==-8
replace strict_limits=1 if V201393==5
replace strict_limits=2 if V201393==4
replace strict_limits=4 if V201393==2
replace strict_limits=5 if V201393==1
label define vallab73 1 "Not nearly strict enough" 2 "Not quite strict enough" 3 "About right" 4 "Somewhat too strict" 5 "Far too strict"
label values strict_limits vallab73
codebook V201393
codebook strict_limits

codebook V201394
gen reopening_speed = V201394
label variable reopening_speed "Re-opening too quickly or too slowly (pre)"
replace reopening_speed=. if V201394==-9 | V201394==-8
replace reopening_speed=2 if V201394==3
replace reopening_speed=3 if V201394==1
replace reopening_speed=1 if V201394==2
label values reopening_speed vallab71
codebook V201394
codebook reopening_speed

codebook V201396x
gen reopening_sum = V201396x
label variable reopening_sum "Summary: re-opening too quickly or too slowly (pre)"
replace reopening_sum=. if V201396x==-2
replace reopening_sum=1 if V201396x==5
replace reopening_sum=2 if V201396x==4
replace reopening_sum=4 if V201396x==2
replace reopening_sum=5 if V201396x==1
label values reopening_sum vallab72
codebook V201396x
codebook reopening_sum

codebook V201397
gen income_gap = V201397
label variable income_gap "Income gap today more or less than 20 years ago (pre)"
replace income_gap=. if V201397==-9 | V201397==-8
replace income_gap=1 if V201397==2
replace income_gap=2 if V201397==3
replace income_gap=3 if V201397==1
label define vallab74 1 "Smaller" 2 "About the same" 3 "Larger"
label values income_gap vallab74
codebook V201397
codebook income_gap

codebook V201400x
gen income_gap_sum = V201400x
label variable income_gap_sum "Summary: how much larger is income gap today (pre)"
replace income_gap_sum=. if V201400x==-2
replace income_gap_sum=1 if V201400x==5
replace income_gap_sum=2 if V201400x==4
replace income_gap_sum=4 if V201400x==2
replace income_gap_sum=5 if V201400x==1
label define vallab75 1 "Much smaller" 2 "Somewhat smaller" 3 "About the same" 4 "Somewhat larger" 5 "Much larger"
label values income_gap_sum vallab75
codebook V201400x
codebook income_gap_sum

codebook V201401
gen climate_action = V201401
label variable climate_action "Government action about rising temperatures (pre)"
replace climate_action=. if V201401==-9 | V201401==-8
replace climate_action=1 if V201401==2
replace climate_action=2 if V201401==3
replace climate_action=3 if V201401==1
label define vallab76 1 "Should be doing less" 2 "Is currently doing the right amount" 3 "Should be doing more"
label values climate_action vallab76
codebook V201401
codebook climate_action

codebook V201402
///I'm not quite sure how to code this. There doesn't seem to be a summary for this question set, which is odd.///

codebook V201403
gen family_leave = V201403
label variable family_leave "Require employers to offer paid leave to parents of new children (pre)"
replace family_leave=. if V201403==-9 | V201403==-8
replace family_leave=1 if V201403==2
replace family_leave=2 if V201403==3
replace family_leave=3 if V201403==1
label values family_leave vallab60
codebook V201403
codebook family_leave

codebook V201405x
gen family_leave_sum = V201405x
label variable family_leave_sum "Summary: require employers to offer paid leave to parents of new children (pre)"
replace family_leave_sum=. if V201405x==-2
replace family_leave_sum=1 if V201405x==7
replace family_leave_sum=2 if V201405x==6
replace family_leave_sum=3 if V201405x==5
replace family_leave_sum=5 if V201405x==3
replace family_leave_sum=6 if V201405x==2
replace family_leave_sum=7 if V201405x==1
label values family_leave_sum vallab61
codebook V201405x
codebook family_leave_sum

codebook V201406
gen gay_services = V201406
label variable gay_services "Services to same sex couples should be required dummy(pre)"
replace gay_services=. if V201406==-9 | V201406==-8
replace gay_services=1 if V201406==2
replace gay_services=0 if V201406==1
label values gay_services vallab1
codebook V201406
codebook gay_services

gen gay_refuse = V201406
label variable gay_refuse "Should be allowed to refuses services to same sex couples dummy (pre)"
replace gay_refuse=. if V201406==-9 | V201406==-8
replace gay_refuse=0 if V201406==2
label values gay_refuse vallab1
codebook V201406
codebook gay_refuse

codebook V201408x
gen gay_service_sum = V201408x
label variable gay_service_sum "Summary: services to same sex couples (pre)"
replace gay_service_sum=. if V201408x==-2
label define vallab77 1 "Feels strongly allowed to refuse services" 2 "Feels moderately strongly should be allowed to refuse" 3 "Feels a little strongly should be allowed to refuse" 4 "Feels a little strongly should be required to provide services" 5 "Feels moderately strongly should be required" 6 "Feels very strongly should be required"
label values gay_service_sum vallab77
codebook V201408x
codebook gay_service_sum

codebook V201409
gen aab_bathroom = V201409
label variable aab_bathroom "Transgender people must use the bathroom of the gender they were assigned at birth dummy (pre)"
replace aab_bathroom=. if V201409==-9 | V201409==-8
replace aab_bathroom=0 if V201409==2
label values aab_bathroom vallab1
codebook V201409
codebook aab_bathroom

gen id_bathroom = V201409
label variable id_bathroom "Transgender people should be allowed to use the bathroom of their identified gender dummy (pre)"
replace id_bathroom=. if V201409==-9 | V201409==-8
replace id_bathroom=1 if V201409==2
replace id_bathroom=0 if V201409==1
label values id_bathroom vallab1
codebook V201409
codebook id_bathroom

codebook V201411x
gen bathroom_sum = V201411x
label variable bathroom_sum "Summary: Transgender policy (pre)"
replace bathroom_sum=. if V201411==-2
label define vallab78 1 "Feels verys trongly trans people should use bathroom of aab (assinged at birth) gender" 2 "Feels moderately strongly trans people should use aab bathroom" 3 "Feels a little strongly trans people should use aab bathroom" 4 "Feels a litttle strongly trans people should use bathroom of their id" 5 "Feels moderately strongly trans people be allowed to use bathroom of id" 6 "Feels very strongly trans people be allowed to use bathroom of id"
label values bathroom_sum vallab78
codebook V201411x
codebook bathroom_sum

codebook V201412
gen gay_discrim = V201412
label variable gay_discrim "Does R favor laws protect same sex ppl against job discrimination dummy (pre) (favor=yes)"
replace gay_discrim=. if V201412==-9 | V201412==-8
replace gay_discrim=0 if V201412==2
label values gay_discrim vallab1
codebook V201412
codebook gay_discrim

codebook V201414x
gen gay_discrim_sum = V201414
label variable gay_discrim_sum "Summary: favor/oppose laws protect same sex ppl against job discrimination (pre)"
replace gay_discrim_sum=. if V201414x==-2
replace gay_discrim_sum=1 if V201414x==4
replace gay_discrim_sum=2 if V201414x==3
replace gay_discrim_sum=3 if V201414x==2
replace gay_discrim_sum=4 if V201414x==1
label values gay_discrim_sum vallab53
codebook V201414x
codebook gay_discrim_sum

codebook V201415
gen gay_adoption = V201415
label variable gay_adoption "Should gay and lesbian couples be allowed to adopt dummy (pre)"
replace gay_adoption=. if V201415==-9 | V201415==-8
replace gay_adoption=0 if V201415==2
label values gay_adoption vallab1
codebook V201415
codebook gay_adoption

codebook V201416
gen gay_marriage = V201416
label variable gay_marriage "R position on gay marriage (pre)"
replace gay_marriage=. if V201416==-9 | V201416==-8
replace gay_marriage=1 if V201416==3
replace gay_marriage=3 if V201416==1
label define vallab79 1 "There should be no legal recognition of same sex couples' relationship" 2 "Same sex couples should be allowed to form civil unions, but not legally marry" 3 "Same sex couples shoudl be allowed to legally marry"
///If I should turn this into three dummies, let me know.///
label values gay_marriage vallab169
codebook V201416
codebook gay_marriage

codebook V201417
gen unauthorized_imm = V201417
label variable unauthorized_imm "US Government policy toward unauthorized immigrants (pre)"
replace unauthorized_imm=. if V201417==-9 | V201417==-8
label define vallab80 1 "Make all felons and send back to home countries" 2 "Have guest worker program that allows them to remain in US, but only for a limited time" 3 "Allow to remain in US & eventually quilify for citizenship provided certain criteria likes fines and back taxes are met" 4 "Allow to remain in US & qualify for citizenship without penalty"
label values unauthorized_imm vallab80
codebook V201417
codebook unauthorized_imm

codebook V201418
gen birth_cit = V201418
label variable birth_cit "Favor or oppose ending birthright citizenship (pre)"
replace birth_cit=. if V201418==-9 | V201418==-8
replace birth_cit=1 if V201418==2
replace birth_cit=2 if V201418==3
replace birth_cit=3 if V201418==1
label values birth_cit vallab60
codebook V201418
codebook birth_cit

codebook V201420x
gen birth_cit_sum = V201420x
label variable birth_cit_sum "Summary: favor or oppose ending birthright citizenship (pre)"
replace birth_cit_sum=. if V201420x==-2
replace birth_cit_sum=1 if V201420x==7
replace birth_cit_sum=2 if V201420x==6
replace birth_cit_sum=3 if V201420x==5
replace birth_cit_sum=5 if V201420x==3
replace birth_cit_sum=6 if V201420x==2
replace birth_cit_sum=7 if V201420x==1
label values birth_cit_sum vallab61
codebook V201420x
codebook birth_cit_sum

codebook V201421
gen children_stay = V201421
label variable children_stay "Should children brought illegally be allowed to stay or sent back dummy (yes is allowed to stay) (pre)"
replace children_stay=. if V201421==-9 | V201421==-8
replace children_stay=0 if V201421==1
replace children_stay=1 if V201421==2
label values children_stay vallab1
codebook V201421
codebook children_stay

codebook V201423x
gen children_stay_sum = V201423x
label variable children_stay_sum "Summary: Should children brought illegally be sent back or allowed to stay (pre)"
replace children_stay_sum=. if V201423x==-2
label define vallab81 1 "Favors a great deal sent back" 2 "Favors a moderate amount sent back" 3 "Favors a little sent back" 4 "Favors a little allowed to stay" 5 "Favors a moderate amount allowed to stay" 6 "Favors a great deal allowed to stay"
label values children_stay_sum vallab81
codebook V201423x
codebook children_stay_sum

codebook V201424
gen border_wall = V201424
label variable border_wall "Favor or oppose building a wall on border with Mexico (pre)"
replace border_wall=. if V201424==-9 | V201424==-8
replace border_wall=1 if V201424==2
replace border_wall=2 if V201424==3
replace border_wall=3 if V201424==1
label values border_wall vallab60
codebook V201424
codebook border_wall

codebook V201426x
gen border_wall_sum = V201426x
label variable border_wall_sum "Summary: fvor or oppose building a wall on border with Mexico (pre)"
replace border_wall_sum=. if V201426x==-2
replace border_wall_sum=1 if V201426x==7
replace border_wall_sum=2 if V201426x==6
replace border_wall_sum=3 if V201426x==5
replace border_wall_sum=5 if V201426x==3
replace border_wall_sum=6 if V201426x==2
replace border_wall_sum=7 if V201426x==1
label values border_wall_sum vallab61
codebook V201426x
codebook border_wall_sum

codebook V201427
gen english_imp = V201427
label variable english_imp "How importnat to speak English in US (pre)"
replace english_imp=. if V201427==-9 | V201427==-8
replace english_imp=0 if V201427==4
replace english_imp=1 if V201427==3
replace english_imp=2 if V201427==2
replace english_imp=3 if V201427==1
label define vallab82 0 "Not at all important" 1 "Not very important" 2 "Somewhat important" 3 "Very important"
label values english_imp vallab82
codebook V201427
codebook english_imp

codebook V201428
gen russ_interfere = V201428
label variable russ_interfere "Likelihood of Russian interference in upcoming election (pre)"
replace russ_interfere=. if V201428==-9 | V201428==-8
replace russ_interfere=0 if V201428==5
replace russ_interfere=1 if V201428==4
replace russ_interfere=2 if V201428==3
replace russ_interfere=3 if V201428==2
replace russ_interfere=4 if V201428==1
label values russ_interfere vallab12
codebook V201428
codebook russ_interfere

codebook V201429
gen urban_unrest = V201429
label variable urban_unrest "Best way to deal with urban unrest (pre)"
replace urban_unrest=. if V201429==-9 | V201429==-8 | V201429==99
label define vallab83 1 "Solve problems of racism and police violence" 7 "Use all avaiable force to maintain law and order"
label values urban_unrest vallab83
codebook V201429
codebook urban_unrest

codebook V201430
gen protest_action = V201430
label variable protest_action "Protesters actions been mostly violent of peaceful (pre)"
replace protest_action=. if V201430==-9 | V201430==-8
replace protest_action=1 if V201430==2
replace protest_action=2 if V201430==3
replace protest_action=3 if V201430==1
label define vallab84 1 "Mostly peaceful" 2 "Equally violent and peaceful" 3 "Mostly violent"
label values protest_action vallab84
codebook V201430
codebook protest_action

codebook V201432x
gen protest_action_sum = V201432x
label variable protest_action_sum "Summary: Protestors actions been mostly violent or peaceful (pre)"
replace protest_action_sum=. if V201432x==-2
replace protest_action_sum=1 if V201432x==5
replace protest_action_sum=2 if V201432x==4
replace protest_action_sum=4 if V201432x==2
replace protest_action_sum=5 if V201432x==1
label define vallab85 1 "A lot more peaceful" 2 "A little more peaceful" 3 "Equally violent and peaceful" 4 "A little more violent" 5 "A lot more violent"
label values protest_action_sum vallab85
codebook V201432x
codebook protest_action_sum

codebook V201433
gen religion_imp = V201433
label variable religion_imp "Is religion important part of R life (pre)"
replace religion_imp=. if V201433==-9 | V201433==-8
replace religion_imp=0 if V201433==5
replace religion_imp=1 if V201433==4
replace religion_imp=2 if V201433==3
replace religion_imp=3 if V201433==2
replace religion_imp=4 if V201433==1
label values religion_imp vallab30
codebook V201433
codebook religion_imp

codebook V201434
gen bible_god = V201434
label variable bible_god "Bible is the word of God dummy (pre)"
replace bible_god=. if V201434==-9 | V201434==-8 | V201434==5
replace bible_god=1 if V201434==2
replace bible_god=0 if V201434==3
label values bible_god vallab1
codebook V201434
codebook bible_god

gen bible_man = V201434
label variable bible_man "Bible is the word of men dummy (pre)"
replace bible_man=. if V201434==-9 | V201434==-8 | V201434==5
replace bible_man=0 if V201434==1 | V201434==2
replace bible_man=1 if V201434==3
label values bible_man vallab1
codebook V201434
codebook bible_man

gen bible_literal = V201434
label variable bible_literal "If God wrote this bible, should it be taken literally dummy (pre)"
replace bible_literal=. if V201434==-9 | V201434==-8 | V201434==5 | V201434==3
replace bible_literal=0 if V201434==2
label values bible_literal vallab1
codebook V201434
codebook bible_literal

codebook V201435
tab V201435
gen r_protestant = V201435
label variable r_protestant "R is presently a protestant dummy (pre)"
replace r_protestant=. if V201435==-9 | V201435==-8
replace r_protestant=0 if inrange(V201435, 2, 12)
label values r_protestant vallab1
tab V201435
codebook r_protestant

gen r_rcath = V201435
label variable r_rcath "R is presently a Roman Catholic dummy (pre)"
replace r_rcath=. if V201435==-9 | V201435==-8
replace r_rcath=0 if V201435==1 | inrange(V201435, 3, 12)
replace r_rcath=1 if V201435==2
label values r_rcath vallab1
tab V201435
codebook r_rcath

gen r_orthodox = V201435
label variable r_orthodox "R is presently an Orthodox Christian dummy (pre)"
replace r_orthodox=. if V201435==-9 | V201435==-8
replace r_orthodox=0 if V201435==1 | V201435==2 | inrange(V201435, 4, 12)
replace r_orthodox=1 if V201435==3
label values r_orthodox vallab1
tab V201435
codebook r_orthodox

gen r_lds = V201435
label variable r_lds "R is presently a member of the Latter-Day Saints (LDS) dummy (pre)"
replace r_lds=. if V201435==-9 | V201435==-8
replace r_lds=0 if inrange(V201435, 1, 3) | inrange(V201435, 5, 12)
replace r_lds=1 if V201435==4
label values r_lds vallab1
tab V201435
codebook r_lds

gen r_jewish = V201435
label variable r_jewish "R is presently Jewish dummy (pre)"
replace r_jewish=. if V201435==-9 | V201435==-8
replace r_jewish=0 if inrange(V201435, 1, 4) | inrange(V201435, 6, 12)
replace r_jewish=1 if V201435==5
label values r_jewish vallab1
tab V201435
codebook r_jewish

gen r_muslim = V201435
label variable r_muslim "R is presently Muslim dummy (pre)"
replace r_muslim=. if V201435==-9 | V201435==-8
replace r_muslim=0 if inrange(V201435, 1, 5) | inrange(V201435, 7, 12)
replace r_muslim=1 if V201435==6
label values r_muslim vallab1
tab V201435
codebook r_muslim

gen r_buddhist = V201435
label variable r_buddhist "R is presently Buddhist dummy (pre)"
replace r_buddhist=. if V201435==-9 | V201435==-8
replace r_buddhist=0 if inrange(V201435, 1, 6) | inrange(V201435, 8, 12)
replace r_buddhist=1 if V201435==7
label values r_buddhist vallab1
tab V201435
codebook r_buddhist

gen r_hindu = V201435
label variable r_hindu "R is presently Hindu dummy (pre)"
replace r_hindu=. if V201435==-9 | V201435==-8
replace r_hindu=0 if inrange(V201435, 1, 7) | inrange(V201435, 9, 12)
replace r_hindu=1 if V201435==8
label values r_hindu vallab1
tab V201435
codebook r_hindu

gen r_atheist = V201435
label variable r_atheist "R is presently Atheist dummy (pre)"
replace r_atheist=. if V201435==-9 | V201435==-8
replace r_atheist=0 if inrange(V201435, 1, 8) | inrange(V201435, 10, 12)
replace r_atheist=1 if V201435==9
label values r_atheist vallab1
tab V201435
codebook r_atheist

gen r_agnostic = V201435
label variable r_agnostic "R is presently Agnostic dummy (pre)"
replace r_agnostic=. if V201435==-9 | V201435==-8
replace r_agnostic=0 if inrange(V201435, 1, 9) | V201435==11 | V201435==12
replace r_agnostic=1 if V201435==10
label values r_agnostic vallab1
tab V201435
codebook r_agnostic

gen r_rel_other = V201435
label variable r_rel_other "R is presently another religion not listed dummy (pre)"
replace r_rel_other=. if V201435==-9 | V201435==-8
replace r_rel_other=0 if inrange(V201435, 1, 10) | V201435==12
replace r_rel_other=1 if V201435==11
label values r_rel_other vallab1
tab V201435
codebook r_rel_other

gen r_no_rel = V201435
label variable r_no_rel "R presently has no reigion in particular dummy (pre)"
replace r_no_rel=. if V201435==-9 | V201435==-8
replace r_no_rel=0 if inrange(V201435, 1, 11)
replace r_no_rel=1 if V201435==12
label values r_no_rel vallab1
tab V201435
codebook r_no_rel

codebook V201436
gen r_atheist_2 = V201436
label variable r_atheist_2 "If R has no particular religion R means atheist dummy (pre)"
replace r_atheist_2=. if V201436==-9 | V201436==-1
replace r_atheist_2=0 if inrange(V201436, 2, 4)
label values r_atheist_2 vallab1
codebook V201436
codebook r_atheist_2

gen r_agnostic_2 = V201436
label variable r_agnostic_2 "If R has no particular religion R means agnostic dummy (pre)"
replace r_agnostic_2=. if V201436==-9 | V201436==-1
replace r_agnostic_2=0 if V201436==1 | V201436==3 | V201436==4
replace r_agnostic_2=1 if V201436==2
label values r_agnostic_2 vallab1
codebook V201436
codebook r_agnostic_2

gen r_christian_2 = V201436
label variable r_christian_2 "If R has no particular religion R means Christian dummy (pre)"
replace r_christian_2=. if V201436==-9 | V201436==-1
replace r_christian_2=0 if V201436==1 | V201436==2 | V201436==4
replace r_christian_2=1 if V201436==3
label values r_christian_2 vallab1
codebook V201436
codebook r_christian_2

gen r_no_rel_2 = V201436
label variable r_no_rel_2 "If R has no particular religion R means nothing in particular dummy (pre)"
replace r_no_rel_2=. if V201436==-9 | V201436==-1
replace r_no_rel_2=0 if inrange(V201436, 1, 3)
replace r_no_rel_2=1 if V201436==4
label values r_no_rel_2 vallab1
codebook V201436
codebook r_no_rel_2

///V201437-V201451z are all -3///

codebook V201452
gen attend_services = V201452
label variable attend_services "Ever attend church or religious services dummy (pre)"
replace attend_services=. if V201452==-9 | V201452==-8
replace attend_services=0 if V201452==2
label values attend_services vallab1
codebook V201452
codebook attend_services

codebook V201453
gen attend_services_freq = V201453
label variable attend_services_freq "Attend religious services how often (pre)"
replace attend_services_freq=. if V201453==-9 | V201453==-8
replace attend_services_freq=0 if V201453==5
replace attend_services_freq=1 if V201453==4
replace attend_services_freq=2 if V201453==3
replace attend_services_freq=3 if V201453==2
replace attend_services_freq=4 if V201453==1
label define vallab86 0 "Never" 1 "A few times a year" 2 "Once or twice a month" 3 "Almost every week" 4 "Every week"
label values attend_services_freq vallab86
codebook V201453
codebook attend_services_freq

codebook V201454
gen attend_services_week = V201454
label variable attend_services_week "Attend church more often than once a week dummy (pre)"
replace attend_services_week=. if V201454==-9 | V201454==-1
replace attend_services_week=0 if V201454==1
replace attend_services_week=1 if V201454==2
label values attend_services_week vallab1
codebook V201454
codebook attend_services_week

*codebook V201455x
///All -2///

codebook V201456
gen born_again = V201456
label variable born_again "Does Christian R consider self born again dummy (pre)"
replace born_again=. if V201456==-9 | V201456==-1
replace born_again=0 if V201456==2
label values born_again vallab1
codebook V201456
codebook born_again

*codebook V201457x
///All -2///

*codebook V201458x
///All -2///

codebook V201459
gen fundamentalist = V201459
label variable fundamentalist "Does R consider self a religious fundamentalist dummy (pre)"
replace fundamentalist=. if V201459==-9 | V201459==-8 | V201459==-1
replace fundamentalist=0 if V201459==2 | V201459==4
replace fundamentalist=1 if V201459==3
///I decided to include "both" under "yes" but also made a dummy for both///
label values fundamentalist vallab1
codebook V201459
codebook fundamentalist

gen evangelical = V201459
label variable evangelical "Does R consider self a religious evangelical dummy (pre)"
replace evangelical=. if V201459==-9 | V201459==-8 | V201459==-1
replace evangelical=0 if V201459==1 | V201459==4
replace evangelical=1 if V201459==2 | V201459==3
label values evangelical vallab1
codebook V201459
codebook evangelical

gen both_fundeve = V201459
label variable both_fundeve "Does R consider self both a religious fundamentalist and evangelical (pre)"
replace both_fundeve=. if V201459==-9 | V201459==-8 | V201459==-1
replace both_fundeve=1 if V201459==3
replace both_fundeve=0 if V201459==1 | V201459==2 | V201459==4
label values both_fundeve vallab1
codebook V201459
codebook both_fundeve

gen neither_fundeve = V201459
label variable neither_fundeve "Does R consider self neither a religious fundamentalist nor evangelical (pre)"
replace neither_fundeve=. if V201459==-9 | V201459==-8 | V201459==-1
replace neither_fundeve=1 if V201459==4
replace neither_fundeve=0 if V201459==1 | V201459==2 | V201459==3
codebook V201459
codebook neither_fundeve

codebook V201460
gen fundamentalist_imp = V201459
label variable fundamentalist_imp "How important to R is being a reigious fundamentalist (pre)"
replace fundamentalist_imp=. if V201460==-9 | V201460==-1
replace fundamentalist_imp=0 if V201460==5
replace fundamentalist_imp=1 if V201460==4
replace fundamentalist_imp=2 if V201460==3
replace fundamentalist_imp=3 if V201460==2
replace fundamentalist_imp=4 if V201460==1
label values fundamentalist_imp vallab30
codebook V201460
codebook fundamentalist_imp

codebook V201461
gen evangelical_imp = V201461
label variable evangelical_imp "How important to R is being a religious evangelical (pre)"
replace evangelical_imp=. if V201461==-9 | V201461==-1
replace evangelical_imp=0 if V201461==5
replace evangelical_imp=1 if V201461==4
replace evangelical_imp=2 if V201461==3
replace evangelical_imp=3 if V201461==2
replace evangelical_imp=4 if V201461==1
label values evangelical_imp vallab30
codebook V201461
codebook evangelical_imp

codebook V201462
tab V201462
gen charismatic_rel = V201462
label variable charismatic_rel "R identifies as religiously Charismatic/Pentecostal dummy (pre)"
replace charismatic_rel=. if V201462==-9 | V201462==-8
replace charismatic_rel=0 if inrange(V201462, 5, 13)
replace charismatic_rel=1 if V201462==2
label values charismatic_rel vallab1
tab V201462
codebook charismatic_rel

gen traditional_rel = V201462
label variable traditional_rel "R identifies as religiously Traditional dummy (pre)"
replace traditional_rel=. if V201462==-9 | V201462==-8
replace traditional_rel=0 if V201462==2 | inrange(V201462, 6, 13)
replace traditional_rel=1 if V201462==5
label values traditional_rel vallab1
tab V201462
codebook traditional_rel

gen mainline_rel = V201462
label variable mainline_rel "R identifies as religiously mainline dummy (pre)"
replace mainline_rel=. if V201462==-9 | V201462==-8
replace mainline_rel=0 if V201462==2 | V201462==5 | inrange(V201462, 7, 13)
replace mainline_rel=1 if V201462==6
label values mainline_rel vallab1
tab V201462
codebook mainline_rel

gen progressive_rel = V201462
label variable progressive_rel "R identifies as religiously progressive dummy (pre)"
replace progressive_rel=. if V201462==-9 | V201462==-8
replace progressive_rel=0 if inrange(V201462, 2, 6) | inrange(V201462, 8, 13)
replace progressive_rel=1 if V201462==7
label values progressive_rel vallab1
tab V201462
codebook progressive_rel

gen nontraditional_rel = V201462
label variable nontraditional_rel "R identifies as religiously Non-traditional believer dummy (pre)"
replace nontraditional_rel=. if V201462==-9 | V201462==-8
replace nontraditional_rel=0 if inrange(V201462, 2, 7) | inrange(V201462, 9, 13)
replace nontraditional_rel=1 if V201462==8
label values nontraditional_rel vallab1
tab V201462
codebook nontraditional

gen secular_rel = V201462
label variable secular_rel "R identifies as religiously secular dummy (pre)"
replace secular_rel=. if V201462==-9 | V201462==-8
replace secular_rel=0 if inrange(V201462, 2, 8) | V201462==12 | V201462==13
replace secular_rel=1 if V201462==9
label values secular_rel vallab1
tab V201462
codebook secular_rel

gen spiritual_nonrel = V201462
label variable spiritual_nonrel "R identifies as Spiritual but not religious dummy (pre)"
replace spiritual_nonrel=. if V201462==-9 | V201462==-8
replace spiritual_nonrel=0 if inrange(V201462, 2, 9) | V201462==13
replace spiritual_nonrel=1 if V201462==12
label values spiritual_nonrel vallab1
tab V201462
codebook spiritual_nonrel

gen no_rel_id = V201462
label variable no_rel_id "R does not identify with any religious identification listed dummy (pre)"
replace no_rel_id=. if V201462==-9 | V201462==-8
replace no_rel_id=0 if inrange(V201462, 2, 12)
replace no_rel_id=1 if V201462==13
label values no_rel_id vallab1
tab V201462
codebook no_rel_id

codebook V201501
gen family_living = V201501
label variable family_living "R living with how many family members (pre)"
replace family_living=. if V201501==-9
label define vallab87 5 "Five or more"
label values family_living vallab87
codebook V201501
codebook family_living

codebook V201502
gen finance_past = V201502
label variable finance_past "R how much better or worse off fincancially than 1 year ago (pre)"
replace finance_past=. if V201502==-9 | V201502==-8
replace finance_past=1 if V201502==5
replace finance_past=2 if V201502==4
replace finance_past=4 if V201502==2
replace finance_past=5 if V201502==1
label define vallab88 1 "Much worse off" 2 "Somewhat worse off" 3 "About the same" 4 "Somewhat better off" 5 "Much better off"
label values finance_past vallab88
codebook V201502
codebook finance_past

codebook V201503
gen finance_future = V201503
label variable finance_future "R how much better or worse off fincancially next year (pre)"
replace finance_future=. if V201503==-9 | V201503==-8
replace finance_future=1 if V201503==5
replace finance_future=2 if V201503==4
replace finance_future=4 if V201503==2
replace finance_future=5 if V201503==1
label values finance_future vallab88
codebook V201503
codebook finance_future
///V201504-V201506 are all -3///

codebook V201507x
gen r_age = V201507x
label variable r_age "Summary: Respondent age (pre)"
replace r_age=. if V201507x==-9
label define vallab89 80 "Age 80 or older"
label values r_age vallab180
codebook V201507x
codebook r_age

codebook V201508
gen married = V201508
label variable married "Married as Marital status dummy (pre)"
replace married=. if V201508==-9 | V201508==-8
replace married=1 if V201508==2
replace married=0 if V201508==3 | V201508==4 | V201508==5 | V201508==6
label values married vallab1
codebook V201508
codebook married

gen widowed = V201508
label variable widowed "Widowed as marital status dummy (pre)"
replace widowed=. if V201508==-9 | V201508==-8
replace widowed=1 if V201508==3
replace widowed=0 if V201508==1 | V201508==2 | V201508==4 | V201508==5 | V201508==6
label values widowed vallab1
codebook V201508
codebook widowed

gen divorced = V201508
label variable divorced "Divorced as marital status dummy (pre)"
replace divorced=. if V201508==-9 | V201508==-8
replace divorced=1 if V201508==4
replace divorced=0 if V201508==1 | V201508==2 | V201508==3 | V201508==5 | V201508==6
label values divorced vallab1
codebook V201508
codebook divorced

gen separated = V201508
label variable separated "Separated as marital status (pre)"
replace separated=. if V201508==-9 | V201508==-8
replace separated=1 if V201508==5
replace separated=0 if V201508==1 | V201508==2 | V201508==3 | V201508==4 | V201508==6
label values separated vallab1
codebook V201508
codebook separated

gen never_married = V201508
label variable never_married "Never married as marital status (pre)"
replace never_married=. if V201508==-9 | V201508==-8
replace never_married=1 if V201508==6
replace never_married=0 if V201508==1 | V201508==2 | V201508==3 | V201508==4 | V201508==5
label values never_married vallab1
codebook V201508
codebook never_married

codebook V201509
gen partner_living = V201509
label variable partner_living "Domestic partnership status (living with partner) (pre)"
replace partner_living=. if V201509==-9 | V201509==-1
replace partner_living=0 if V201509==2
label values partner_living vallab1
codebook V201509
codebook partner_living

codebook V201510
gen edu_lvl = V201510
label variable edu_lvl "Highest level of Education (pre)"
replace edu_lvl=. if V201510==-9 | V201510==-8 | V201510==95
///I put the "other" category under missing.///
label define vallab90 1 "Less than high school" 2 "High school graduate - High school" 3 "Some college but not degree" 4 "Associate degree in college - occupational program" 5 "Associate degree in college - academic program" 6 "Bachelor's degree" 7 "Master's degree" 8 "Professional school degree"
label values edu_lvl vallab90
codebook edu_lvl

codebook V201510z
///All -2///

codebook V201511x
gen edu_lvl_5 = V201511x
label variable edu_lvl_5 "Respondent 5 category lvl of education (pre)"
replace edu_lvl_5=. if V201511x==-9 | V201511x==-8 | V201511x==-2
label define vallab91 1 "Less than high school" 2 "High school" 3 "Some post-high school, no bachelor's degree" 4 "Bachelor's degree" 5 "Graduate degree"
label values edu_lvl_5 vallab91
codebook V201511x
codebook edu_lvl_5

codebook V201512
gen diploma_ged = V201512
label variable diploma_ged "R: Diploma or GED dummy (yes is high school diploma) (pre)"
replace diploma_ged=. if V201512==-9 | V201512==-1
replace diploma_ged=0 if V201512==2
label values diploma_ged vallab1
codebook V201512
codebook diploma_ged

codebook V201513
gen spouse_edu_lvl = V201513
label variable spouse_edu_lvl "Spouse partner: highest lvl of education (pre)"
replace spouse_edu_lvl=. if V201513==-9 | V201513==-8 | V201513==-1 | V201513==95
///Again, I put other into missing///
label values spouse_edu_lvl vallab90
codebook spouse_edu_lvl

codebook V201513z
///All -3///

codebook V201514x
gen spouse_edu_lvl_5 = V201514x
label variable spouse_edu_lvl_5 "Summary: Respondent spouse/partner 5 category lvl of education (pre)"
replace spouse_edu_lvl_5=. if V201514x==-9 | V201514x==-8 | V201514x==-2 | V201514x==-1
label values spouse_edu_lvl_5 vallab91
codebook V201514x
codebook spouse_edu_lvl_5

codebook V201515
gen spouse_diploma_ged = V201515
label variable spouse_diploma_ged "Spouse: diploma or GED dummy (yes is high school diploma) (pre)"
replace spouse_diploma_ged=. if V201515==-9 | V201515==-1
replace spouse_diploma_ged=0 if V201515==2
label values spouse_diploma_ged vallab1
codebook V201515
codebook spouse_diploma_ged

codebook V201516
gen active_duty = V201516
label variable active_duty "Armed forces active duty (pre)"
replace active_duty=. if V201516==-9
replace active_duty=0 if V201516==3
replace active_duty=1 if V201516==2
replace active_duty=2 if V201516==1
label define vallab92 0 "Have never served on active duty" 1 "Previously served on active duty but not now on active duty" 2 "Now serving on active duty"
label values active_duty vallab92
codebook V201516
codebook active_duty

codebook V201517
gen worked_for_pay = V201517
label variable worked_for_pay "R worked for pay last week dummy (pre)"
///It should be noted that the original code includes retired under "no" without using a new category///
replace worked_for_pay=. if V201517==-9
replace worked_for_pay=0 if V201517==2
label values worked_for_pay vallab1
codebook V201517
codebook worked_for_pay

codebook V201518
gen any_work = V201518
label variable any_work "Any work for pay last week (pre)"
replace any_work=. if V201518==-9 | V201518==-8 | V201518==-1
replace any_work=0 if V201518==2
label values any_work vallab1
codebook V201518
codebook any_work

codebook V201519
gen on_layoff = V201519
label variable on_layoff "R on layoff from a job last week dummy(pre)"
replace on_layoff=. if V201519==-9 | V201519==-8 | V201519==-1
replace on_layoff=0 if V201519==2
label values on_layoff vallab1
codebook V201519
codebook on_layoff

codebook V201520
gen temp_absent = V201520
label variable temp_absent "R temporarily absent from job last week dummy (pre)"
replace temp_absent=. if V201520==-9 | V201520==-1
replace temp_absent=0 if V201520==2
label values temp_absent vallab1
codebook V201520
codebook temp_absent

codebook V201521
///It should be noted that over 8000 responses are inapplicable to this question///
gen return_work = V201521
label variable return_work "R has been informed about returning to work dummy (pre)"
replace return_work=. if V201521==-1
replace return_work=0 if V201521==2
label values return_work vallab1
codebook V201521
codebook return_work

codebook V201522
gen looking_work = V201522
label variable looking_work "R actively looking for work dummy (pre)"
replace looking_work=. if V201522==-9 | V201522==-1
replace looking_work=0 if V201522==2
label values looking_work vallab1
codebook V201522
codebook looking_work

codebook V201523
///It should be noted that over 7500 responses are inapplicable///
gen could_work = V201523
label variable could_work "R could have started job or returned to work last week dummy (pre)"
replace could_work=. if V201523==-1
replace could_work=0 if V201523==2
label values could_work vallab1
codebook V201523
codebook could_work

codebook V201524
gen last_worked = V201524
label variable last_worked "When did R last work (pre)"
replace last_worked=. if V201524==-9 | V201524==-8 | V201524==-1
replace last_worked=0 if V201524==4
label define vallab93 0 "Never worked" 1 " WIthin the past 12 months" 2 "1 to 5 years ago" 3 "Over 5 years ago"
label values last_worked vallab93
codebook V201524
codebook last_worked

codebook V201525
gen work_every_week = V201525
label variable work_every_week "Did R work every week past 12 months dummy (pre)"
replace work_every_week=. if V201525==-9 | V201525==-1
replace work_every_week=0 if V201525==2
label values work_every_week vallab1
codebook V201525
codebook work_every_week

codebook V201526
gen weeks_worked = V201526
label variable weeks_worked "How may weeks R worked past 12 months (pre)"
replace weeks_worked=. if V201526==-9 | V201526==-8 | V201526==-1
codebook V201526
codebook weeks_worked

codebook V201527
gen hours_worked = V201527
label variable hours_worked "How many hours R worked per week (pre)"
replace hours_worked=. if V201527==-9 | V201527==-8 | V201527==-1
codebook V201527
codebook hours_worked

codebook V201528
gen hours_ok = V201528
label variable hours_ok "Hours worked per week past 12 months ok (pre)"
replace hours_ok=. if V201528==-9 | V201528==-8 | V201528==-1
replace hours_ok=1 if V201528==2
replace hours_ok=2 if V201528==3
replace hours_ok=3 if V201528==1
label define vallab94 1 "Fever" 2 "About right" 3 "More"
label values hours_ok vallab94
codebook V201528
codebook hours_ok

codebook V201529
tab V201529
gen for_profit = V201529
label variable for_profit "R works for a For-profit company or organization dummy (pre)"
replace for_profit=. if V201529==-9 | V201529==-1
replace for_profit=0 if inrange(V201529, 2, 9)
label values for_profit vallab1
tab V201529
codebook for_profit

gen non_profit = V201529
label variable non_profit "R works for a Non-profit organization (including tax-exempt and charitable organizations) dummy (pre)"
replace non_profit=. if V201529==-9 | V201529==-1
replace non_profit=0 if V201529==1 | inrange(V201529, 3, 9)
replace non_profit=1 if V201529==2
label values non_profit vallab1
tab V201529
codebook non_profit

gen local_work = V201529
label variable local_work "R works for a Local government dummy (pre)"
replace local_work=. if V201529==-9 | V201529==-1
replace local_work=0 if V201529==1 | V201529==2 | inrange(V201529, 4, 9)
replace local_work=1 if V201529==3
label values local_work vallab1
tab V201529
codebook local_work

gen state_work = V201529
label variable state_work "R works for a State government dummy (pre)"
replace state_work=. if V201529==-9 | V201529==-1
replace state_work=0 if inrange(V201529, 1, 3) | inrange(V201529, 5, 9)
replace state_work=1 if V201529==4
label values state_work vallab1
tab V201529
codebook state_work

gen army_work = V201529
label variable army_work "R is on active duty in US Armed Forces or Commissioned Corps dummy (pre)"
replace army_work=. if V201529==-9 | V201529==-1
replace army_work=0 if inrange(V201529, 1, 4) | inrange(V201529, 6, 9)
replace army_work=1 if V201529==5
label values army_work vallab1
tab V201529
codebook army_work

gen civilian_fed = V201529
label variable civilian_fed "R works for the Federal GOvernment as a civilian employee dummy (pre)"
replace civilian_fed=. if V201529==-9 | V201529==-1
replace civilian_fed=0 if inrange(V201529, 1, 5) | inrange(V201529, 7, 9)
replace civilian_fed=1 if V201529==6
label values civilian_fed vallab1
tab V201529
codebook civilian_fed

gen ninc_owner = V201529
label variable ninc_owner "R works as owner of non-incorporated business, professional practice, or farm dummy (pre)"
replace ninc_owner=. if V201529==-9 | V201529==-1
replace ninc_owner=0 if inrange(V201529, 1, 6) | V201529==8 | V201529==9
replace ninc_owner=1 if V201529==7
label values ninc_owner vallab1
tab V201529
codebook ninc_owner

gen inc_owner = V201529
label variable inc_owner "R works as owner of incorporated business, professional practice, or farm dummy (pre)"
replace inc_owner=. if V201529==-9 | V201529==-1
replace inc_owner=0 if inrange(V201529, 1, 7) | V201529==9
replace inc_owner=1 if V201529==8
label values inc_owner vallab1
tab V201529
codebook inc_owner

gen no_pay_family = V201529
label variable no_pay_family "R works without pay in a for-profit family business or farm for 15 hours or more per week dummy (pre)"
replace no_pay_family=. if V201529==-9 | V201529==-1
replace no_pay_family=0 if inrange(V201529, 1, 8)
replace no_pay_family=1 if V201529==9
label values no_pay_family vallab1
tab V201529
codebook no_pay_family

///V201530-V201532x are all -3///
///V201533x and V201534x are all -2///
///There is no V201535 or V201536///

/*
codebook V201537
gen homemaker = V201537
label variable homemaker "R non-worked status homemaker dummy (pre)"
replace homemaker=. if V201537==-9 | V201537==-8 | V201537==-1
replace homemaker=0 if V201537==2 | V201537==3 | V201537==4 | V201537==5
label values homemaker vallab1
codebook V201537
codebook homemaker

gen retired = V201537
label variable retired "R non-working status retired dummy (pre)"
replace retired=. if V201537==-9 | V201537==-8 | V201537==-1
replace retired=1 if V201537==2
replace retired=0 if V201537==1 | V201537==3 | V201537==4 | V201537==5
label values retired vallab1
codebook V201537
codebook retired

gen perm_disabled = V201537
label variable perm_disabled "R non-working status permanently disabled dummy (pre)"
replace perm_disabled=. if V201537==-9 | V201537==-8 | V201537==-1
replace perm_disabled=1 if V201537==3
replace perm_disabled=0 if V201537==1 | V201537==2 | V201537==4 | V201537==5
label values perm_disabled vallab1
codebook V201537
codebook perm_disabled

gen full_student = V201537
label variable full_student "R non-working status full time student dummy (pre)"
replace full_student=. if V201537==-9 | V201537==-8 | V201537==-1
replace full_student=1 if V201537==4
replace full_student=0 if V201537==1 | V201537==2 | V201537==3 | V201537==5
label values full_student vallab1
codebook V201537
codebook full_student

gen other_nonworker = V201537
label variable other_nonworker "R non-worker status none of the listed options dummy (pre)"
replace other_nonworker=. if V201537==-9 | V201537==-8 | V201537==-1
replace other_nonworker=1 if V201537==5
replace other_nonworker=0 if V201537==1 | V201537==2 | V201537==3 | V201537==4
label values other_nonworker vallab1
codebook V201537
codebook other_nonworker
*/

codebook V201538
gen year_retired = V201538
label variable year_retired "Initial status retiree - year retired (pre)"
replace year_retired=. if V201538==-9 | V201538==-8 | V201538==-1
label define vallab95 1 "1950-1999" 2 "2000-2004" 3 "2005-2009" 4 "2010-2014" 5 "2015-2020"
label values year_retired vallab95
codebook V201538
codebook year_retired

codebook V201539
gen laid_off = V201539
label variable laid_off "Working now: out of work or laid off in last 6 months dummy (pre)"
replace laid_off=. if V201539==-9 | V201539==-1
replace laid_off=0 if V201539==2
label values laid_off vallab1
codebook V201539
codebook laid_off

codebook V201540
gen worry_fired = V201540
label variable worry_fired "Working now: worry about losing job in near future (pre)"
replace worry_fired=. if V201540==-9 | V201540==-8 | V201540==-1
replace worry_fired=0 if V201540==1
replace worry_fired=1 if V201540==2
replace worry_fired=2 if V201540==3
replace worry_fired=3 if V201540==4
replace worry_fired=4 if V201540==5
label values worry_fired vallab15
codebook V201540
codebook worry_fired

codebook V201541
gen red_hours_pay = V201541
label variable red_hours_pay "Working now: had reduction in work hours or pay cut dummy (pre)"
replace red_hours_pay=. if V201541==-9 | V201541==-8 | V201541==-1
replace red_hours_pay=0 if V201541==2
label values red_hours_pay vallab1
codebook V201541
codebook red_hours_pay

codebook V201542
gen spouse_working = V201542
label variable spouse_working "Spouse/partner working status working now dummy (pre)"
replace spouse_working=. if V201542==-9 | V201542==-1
replace spouse_working=0 if inrange(V201542, 2, 8)
label values spouse_working vallab1
codebook V201542
codebook spouse_working

gen spouse_laid_off = V201542
label variable spouse_laid_off "Spouse/partner working status laid off dummy (pre)"
replace spouse_laid_off=. if V201542==-9 | V201542==-1
replace spouse_laid_off=1 if V201542==2
replace spouse_laid_off=0 if V201542==1 | inrange(V201542, 3, 8)
label values spouse_laid_off vallab1
codebook V201542
codebook spouse_laid_off

gen spouse_unemp = V201542
label variable spouse_unemp "Spouse/partner working status unemployed dummy (pre)"
replace spouse_unemp=. if V201542==-9 | V201542==-1
replace spouse_unemp=1 if V201542==4
replace spouse_unemp=0 if V201542==1 | V201542==2 | inrange(V201542, 5, 8)
label values spouse_unemp vallab1
codebook V201542
codebook spouse_unemp

gen spouse_retired = V201542
label variable spouse_retired "Spouse/partner working status retried dummy (pre)"
replace spouse_retired=. if V201542==-9 | V201542==-1
replace spouse_retired=1 if V201542==5
replace spouse_retired=0 if inrange(V201542, 1, 4) | inrange(V201542, 6, 8)
label values spouse_retired vallab1
codebook V201542
codebook spouse_retired

gen spouse_disabled = V201542
label variable spouse_disabled "Spouse/partner working status permanently disabled dummy (pre)"
replace spouse_disabled=. if V201542==-9 | V201542==-1
replace spouse_disabled=1 if V201542==6
replace spouse_disabled=0 if inrange(V201542, 1, 5) | V201542==7 | V201542==8
label values spouse_disabled vallab1
codebook V201542
codebook spouse_disabled

gen spouse_homemaker = V201542
label variable spouse_homemaker "Spouse/partner working status homemaker dummy (pre)"
replace spouse_homemaker=. if V201542==-9 | V201542==-1
replace spouse_homemaker=1 if V201542==7
replace spouse_homemaker=0 if inrange(V201542, 1, 6) | V201542==8
label values spouse_homemaker vallab1
codebook V201542
codebook spouse_homemaker

gen spouse_student = V201542
label variable spouse_student "Spouse/partner working status student dummy (pre)"
replace spouse_student=. if V201542==-9 | V201542==-1
replace spouse_student=1 if V201542==8
replace spouse_student=0 if inrange(V201542, 1, 7)
codebook V201542
codebook spouse_student

codebook V201543
///All -2///
codebook V201544
gen hh_union_member = V201544
label variable hh_union_member "Anyone in HH (household) belong to labor union dummy (pre)"
replace hh_union_member=. if V201544==-9 | V201544==-8
replace hh_union_member=0 if V201544==2
label values hh_union_member vallab1
codebook V201544
codebook hh_union_member

codebook V201545
gen r_union = V201545
label variable r_union "R belongs to union dummy (pre)"
replace r_union=. if V201545==-9 | V201545==-1
replace r_union=0 if V201545==2 | V201545==4
label values r_union vallab1
codebook V201545
codebook r_union

gen spouse_union = V201545
label variable spouse_union "Spouse/partner belongs to union dummy (pre)"
replace spouse_union=. if V201545==-9 | V201545==-1
replace spouse_union=1 if V201545==2
replace spouse_union=0 if V201545==1 | V201545==4
label values spouse_union vallab1
codebook V201545
codebook spouse_union

gen other_union = V201545
label variable other_union "Someone else in HH belongs to union dummy (pre)"
replace other_union=. if V201545==-9 | V201545==-1
replace other_union=1 if V201545==4
replace other_union=0 if V201545==1 | V201545==2
label values other_union vallab1
codebook V201545
codebook other_union

codebook V201546
gen spn_heritage = V201546
label variable spn_heritage "R: Are you spanish, Hispanic or Latino dummy (pre)"
replace spn_heritage=. if V201546==-9 | V201546==-8
replace spn_heritage=0 if V201546==2
label values spn_heritage vallab1
codebook V201546
codebook spn_heritage
///V201547a-V201547z all -3///

codebook V201549x
gen r_white = V201549x
label variable r_white "R self-identified as white (non-hispanic) dummy (pre)"
replace r_white=. if V201549x==-9 | V201549x==-8
replace r_white=0 if inrange(V201549x, 2, 6)
label values r_white vallab1
codebook V201549x
codebook r_white

gen r_black = V201549x
label variable r_black "R self-identified as black (non-hispanic) dummy (pre)"
replace r_black=. if V201549x==-9 | V201549x==-8
replace r_black=1 if V201549x==2
replace r_black=0 if V201549x==1 | inrange(V201549x, 3, 6)
label values r_black vallab1
codebook V201549x
codebook r_black

gen r_hispanic = V201549x
label variable r_hispanic "R self-identified as hispanic dummy (pre)"
replace r_hispanic=. if V201549x==-9 | V201549x==-8
replace r_hispanic=1 if V201549x==3
replace r_hispanic=0 if V201549x==1 | V201549x==2 | inrange(V201549x, 4, 6)
label values r_hispanic vallab1
codebook V201549x
codebook r_hispanic

gen r_aapi = V201549x
label variable r_aapi "R self-identified as Asian or Native Hawaiian/other Pacific Islander dummy (pre)"
replace r_aapi=. if V201549x==-9 | V201549x==-8
replace r_aapi=1 if V201549x==4
replace r_aapi=0 if inrange(V201549x, 1, 3) | V201549x==5 | V201549x==6
label values r_aapi vallab1
codebook V201549x
codebook r_aapi

gen r_native = V201549x
label variable r_native "R self-identified as Native American or Alaska Native dummy (pre)"
replace r_native=. if V201549x==-9 | V201549x==-8
replace r_native=1 if V201549x==5
replace r_native=0 if V201549x==6 | inrange(V201549x, 1, 4)
label values r_native vallab1
codebook V201549x
codebook r_native

gen r_multiple_races = V201549x
label variable r_multiple_races "R self-identified as multiple races dummy (pre)"
replace r_multiple_races=. if V201549x==-9 | V201549x==-8
replace r_multiple_races=1 if V201549x==6
replace r_multiple_races=0 if inrange(V201549x, 1, 5)
label values r_multiple_races vallab1
codebook V201549x
codebook r_multiple_races

codebook V201550
///All -3///
codebook V201551
gen ethnic_number = V201551
label variable ethnic_number "Number of ethnic mentions by R (pre)"
replace ethnic_number=. if V201551==-1
codebook V201551
codebook ethnic_number

codebook V201552
///All -3///
codebook V201553
gen native_parents = V201553
label variable native_parents "Native status of parents (pre)"
replace native_parents=. if V201553==-9 | V201553==-8
replace native_parents=0 if V201553==3
replace native_parents=1 if V201553==2
replace native_parents=2 if V201553==1
label define vallab96 0 "Both parents born in another country" 1 "One parent born in US" 2 "Both parents born in US"
label values native_parents vallab96
codebook V201553
codebook native_parents

codebook V201554
gen r_birthplace_statedc = V201554
label variable r_birthplace_statedc "R born in US state or Washington DC dummy (pre)"
replace r_birthplace_statedc=. if V201554==-9
replace r_birthplace_statedc=0 if inrange(V201554, 2, 4)
label values r_birthplace_statedc vallab1
codebook V201554
codebook r_birthplace_statedc

gen r_birthplace_pr = V201554
label variable r_birthplace_pr "R born in Puerto Rice dummy (pre)"
replace r_birthplace_pr=. if V201554==-9
replace r_birthplace_pr=1 if V201554==2
replace r_birthplace_pr=0 if V201554==1 | V201554==3 | V201554==4
label values r_birthplace_pr vallab1
codebook V201554
codebook r_birthplace_pr

gen r_birthplace_terr = V201554
label variable r_birthplace_terr "R born in another US territory dummy (pre)"
replace r_birthplace_terr=. if V201554==-9
replace r_birthplace_terr=1 if V201554==3
replace r_birthplace_terr=0 if V201554==1 | V201554==2 | V201554==4
label values r_birthplace_terr vallab1
codebook V201554
codebook r_birthplace_terr

gen r_birthplace_outside = V201554
label variable r_birthplace_outside "R born in another country dummy (pre)"
replace r_birthplace_outside=. if V201554==-9
replace r_birthplace_outside=1 if V201554==4
replace r_birthplace_outside=0 if inrange(V201554, 1, 3)
label values r_birthplace_outside vallab1
codebook V201554
codebook r_birthplace_outside

codebook V201554z
///All -2///
codebook V201555
gen grandparents_outside = V201555
label variable grandparents_outside "How many grandparents born outside US (pre)"
replace grandparents_outside=. if V201555==-9 | V201555==-8
label define vallab97 0 "None" 1 "One" 2 "Two" 3 "Three" 4 "All"
label values grandparents_outside vallab97
codebook V201555
codebook grandparents_outside

///V201556-V201557 all -3///
codebook V201558x
///All -2///
codebook V201559
gen mexican_heritage = V201559
label variable mexican_heritage "Latino Rs: any Mexican ancestry dummy (pre)"
replace mexican_heritage=. if V201559==-1
replace mexican_heritage=0 if V201559==2
label values mexican_heritage vallab1
codebook V201559
codebook mexican_heritage
///V201560 and V201561 all -3///

codebook V201562
gen latino_home_lang = V201562
label variable latino_home_lang "Latino Rs: language at home (pre)"
replace latino_home_lang=. if V201562==-9 | V201562==-1
label define vallab98 1 "Only English" 2 "Mostly English" 3 "Both languages equally" 4 "Mostly Spanish" 5 "Only Spanish"
label values latino_home_lang vallab98
codebook V201562
codebook latino_home_lang

codebook V201563
gen spouse_hispanic_or = V201563
label variable spouse_hispanic_or "R spouse Hispanic origin dummy (pre)"
replace spouse_hispanic_or=. if inrange(V201563, -9, -1)
replace spouse_hispanic_or=0 if V201563==2
label values spouse_hispanic_or vallab1
codebook V201563
codebook spouse_hispanic
///V201564a - V201564e all -3///

codebook V201565x
gen spouse_white = V201565x
label variable spouse_white "R spouse/partner white dummy (pre)"
replace spouse_white=. if V201565x==-9 | V201565x==-8 | V201565x==-1
replace spouse_white=0 if inrange(V201565x, 2, 4)
label values spouse_white vallab1
codebook V201565x
codebook spouse_white

gen spouse_black = V201565x
label variable spouse_black "R spouse/partner black dummy (pre)"
replace spouse_black=. if inrange(V201565x, -9, -1)
replace spouse_black=1 if V201565x==2
replace spouse_black=0 if V201565x==1 | V201565x==3 | V201565x==4
label values spouse_black vallab1
codebook V201565x
codebook spouse_black

gen spouse_hispanic = V201565x
label variable spouse_hispanic "R spouse/partner Hispanic dummy (pre)"
replace spouse_hispanic=. if inrange(V201565x, -9, -1)
replace spouse_hispanic=1 if V201565x==3
replace spouse_hispanic=0 if V201565x==1 | V201565x==2 | V201565x==4
label values spouse_hispanic vallab1
codebook V201565x
codebook spouse_hispanic

gen spouse_aapi = V201565x
label variable spouse_aapi "R spouse/partner Asian, Pacific Islander, Native American/Alaskan dummy (pre)"
replace spouse_aapi=. if inrange(V201565x, -9, -1)
replace spouse_aapi=1 if V201565==4
replace spouse_aapi=0 if inrange(V201565x, 1, 3)
label values spouse_aapi vallab1
codebook V201565x
codebook spouse_aapi

codebook V201566
gen spouse_male = V201566
label variable spouse_male "R spouse/partner male dummy (pre)"
replace spouse_male=. if V201566==-9 | V201566==-1
replace spouse_male=0 if V201566==2 | V201566==3
label values spouse_male vallab1
codebook V201566
codebook spouse_male

gen spouse_female = V201566
label variable spouse_female "R spouse/partner female dummy (pre)"
replace spouse_female=. if V201566==-9 | V201566==-1
replace spouse_female=1 if V201566==2
replace spouse_female=0 if V201566==1 | V201566==3
label values spouse_female vallab1
codebook V201566
codebook spouse_female

gen spouse_nb = V201566
label variable spouse_nb "R spouse/partner gender neither male nor female dummy (pre)"
replace spouse_nb=. if V201566==-9 | V201566==-1
replace spouse_nb=1 if V201566==3
replace spouse_nb=0 if V201566==1 | V201566==2
label values spouse_nb vallab1
codebook V201566
codebook spouse_nb

codebook V201567
gen children_number = V201567
label variable children_number "How many children in HH age 0-17 (pre)"
replace children_number=. if V201567==-9
label define vallab99 0 "No children" 1 "One children" 2 "Two children" 3 "Three children" 4 "Four or more children"
label values children_number vallab99
codebook V201567
codebook children_number

codebook V201568a
gen enroll_pub_sch = V201568a
label variable enroll_pub_sch "Children's school enrollment: public school dummy (pre)"
replace enroll_pub_sch=. if V201568a==-9 | V201568a==-1
label values enroll_pub_sch vallab1
codebook V201568a
codebook enroll_pub_sch

codebook V201568b
gen enroll_prv_rel = V201568b
label variable enroll_prv_rel "Children's school enrollment: private religious school dummy (pre)"
replace enroll_prv_rel=. if V201568b==-9 | V201568b==-1
label values enroll_prv_rel vallab1
codebook V201568b
codebook enroll_prv_rel

codebook V201568c
gen enroll_prv_sch = V201568c
label variable enroll_prv_sch "Children's school enrollment: private non-religious school dummy(pre)"
replace enroll_prv_sch=. if V201568c==-9 | V201568c==-1
label values enroll_prv_sch vallab1
codebook V201568c
codebook enroll_prv_sch

codebook V201568d
gen enroll_home = V201568d
label variable enroll_home "Children's school enrollment: home school dummy (pre)"
replace enroll_home=. if V201568d==-9 | V201568d==-1
label values enroll_home vallab1
codebook V201568d
codebook enroll_home

codebook V201568e
gen enroll_none = V201568e
label variable enroll_none "Children's school enrollment: not enrolled in school dummy (pre)"
replace enroll_none=. if V201568e==-9 | V201568e==-1
label values enroll_none vallab1
codebook V201568e
codebook enroll_none

codebook V201569
gen internet_home = V201569
label variable internet_home "Does R use Internet at home dummy (pre)"
replace internet_home=. if V201569==-9
replace internet_home=0 if V201569==2
label values internet_home vallab1
codebook V201569
codebook internet_home

codebook V201570
gen internet_away = V201570
label variable internet_away "Does R use Internet at any other location dummy (pre)"
replace internet_away=. if V201570==-8 | V201570==-1
replace internet_away=0 if V201570==2
label values internet_away vallab1
codebook V201570
codebook internet_away

codebook V201571
gen landline = V201571
label variable landline "Is there a working HH landline phone dummy (pre)"
replace landline=. if V201571==-9
replace landline=0 if V201571==2
label values landline vallab1
codebook V201571
codebook landline

codebook V201572
gen cell_phone = V201572
label variable cell_phone "Does R personally have a cell phone dummy (pre)"
replace cell_phone=. if V201572==-9
replace cell_phone=0 if V201572==2
label values cell_phone vallab1
codebook V201572
codebook cell_phone

codebook V201573
gen live_cell = V201573
label variable live_cell "Does R live with anyone who has a cell phone dummy (pre)"
replace live_cell=. if V201573==-1
replace live_cell=0 if V201573==2
label values live_cell vallab1
codebook V201573
codebook live_cell

codebook V201574
gen cell_internet = V201574
label variable cell_internet "R or anyone in HH has cell phone with internet connection dummy (pre)"
replace cell_internet=. if V201574==-9 | V201574==-8 | V201574==-1
replace cell_internet=0 if V201574==2
label values cell_internet vallab1
codebook V201574
codebook cell_internet

codebook V201575
///Since I need to make about 50 dummies for this, I'm going to start by creating a verson that eliminates all the missing so that I don't have to code it each time.///
gen V2015752 = V201575
label variable V2015752 "Where R grew up (all 50 states but missing coded) (pre)"
replace V2015752=. if V2015752==-9 | V2015752==-8
label define vallab112 1 "1. Alabama" 2 "2. Alaska" 4 "4. Arizona" 5 "5. Arkansas" 6 "6. California" 8 "8. Colorado" 9 "9. Connecticut" 10 "10. Delaware" 11 "11. District of Columbia (Washington DC)" 12 "12. Florida" 13 "13. Georgia" 15 "15. Hawaii" 16 "16. Idaho" 17 "17. Illinois" 18 "18. Indiana" 19 "19. Iowa" 20 "20. Kansas" 21 "21. Kentucky" 22 "22. Louisiana" 23 "23. Maine" 24 "24. Maryland" 25 "25. Massachusetts" 26 "26. Michigan" 27 "27. Minnesota" 28 "28. Mississippi" 29 "29. Missouri" 30 "30. Montana" 31 "31. Nebraska" 32 "32. Nevada" 33 "33. New Hampshire" 34 "34. New Jersey" 35 "35. New Mexico" 36 "36. New York" 37 "37. North Carolina" 38 "38. North Dakota" 39 "39. Ohio" 40 "40. Oklahoma" 41 "41. Oregon" 42 "42. Pennsylvania" 44 "44. Rhode Island" 45 "45. South Caronlina" 46 "46. South Dakota" 47 "47. Tennessee" 48 "48. Texas" 49 "49. Utah" 50 "50. Vermont" 51 "51. Virginia" 53 "53. Washington" 54 "54. West Virginia" 55 "55. Wisconsin" 56 "56. Wyoming" 57 "57. Puerto Rico" 58 "58. Another U.S. territory (Guam, Samoa, U.S. Virgin Islands)" 59 "59. Another Country"
label values V2015752 vallab112
gen r_al = V2015752
label variable r_al "R grew up in Alabama dummy (pre)"
replace r_al=0 if inrange(V2015752, 2, 59)
label values r_al vallab1
codebook r_al

gen r_ak = V2015752
label variable r_ak "R grew up in Alaska dummy (pre)"
replace r_ak=0 if V2015752==1 | inrange(V2015752, 4, 59)
replace r_ak=1 if V2015752==2
label values r_ak vallab1

gen r_az = V2015752
label variable r_az "R grew up in Arizona dummy (pre)"
replace r_az=0 if V2015752==1 | V2015752==2 | inrange(V2015752, 5, 59)
replace r_az=1 if V2015752==4
label values r_az vallab1

gen r_ar = V2015752
label variable r_ar "R grew up in Arkansas dummy (pre)"
replace r_ar=0 if inrange(V2015752, 1, 4) | inrange(V2015752, 6, 59)
replace r_ar=1 if V2015752==5
label values r_ar vallab1

gen r_ca = V2015752
label variable r_ca "R grew up in California dummy (pre)"
replace r_ca=0 if inrange(V2015752, 1, 5) | inrange(V2015752, 8, 59)
replace r_ca=1 if V2015752==6
label values r_ca vallab1

gen r_co = V2015752
label variable r_co "R grew up in Colorado dummy (pre)"
replace r_co=0 if inrange(V2015752, 1, 6) | inrange(V2015752, 9, 59)
replace r_co=1 if V2015752==8
label values r_co vallab1

gen r_ct = V2015752
label variable r_ct "R grew up in Connecticut dummy (pre)"
replace r_ct=0 if inrange(V2015752, 1, 8) | inrange(V2015752, 10, 59)
replace r_ct=1 if V2015752==9
label values r_ct vallab1

gen r_de = V2015752
label variable r_de "R grew up in Delaware dummy (pre)"
replace r_de=0 if inrange(V2015752, 1, 9) | inrange(V2015752, 11, 59)
replace r_de=1 if V2015752==10
label values r_de vallab1

gen r_dc = V2015752
label variable r_dc "R grew up in District of Columbia (Washington DC) dummy (pre)"
replace r_dc=0 if inrange(V2015752, 1, 10) | inrange(V2015752, 12, 59)
replace r_dc=1 if V2015752==11
label values r_dc vallab1

gen r_fl = V2015752
label variable r_fl "R grew up in Florida dummy (pre)"
replace r_fl=0 if inrange(V2015752, 1, 11) | inrange(V2015752, 13, 59)
replace r_fl=1 if V2015752==12
label values r_fl vallab1

gen r_ga = V2015752
label variable r_ga "R grew up in Georgia dummy (pre)"
replace r_ga=0 if inrange(V2015752, 1, 12) | inrange(V2015752, 15, 59)
replace r_ga=1 if V2015752==13
label values r_ga vallab1

gen r_ha = V2015752
label variable r_ha "R grew up in Hawaii dummy (pre)"
replace r_ha=0 if inrange(V2015752, 1, 13) | inrange(V2015752, 16, 59)
replace r_ha=1 if V2015752==15
label values r_ha vallab1

gen r_id = V2015752
label variable r_id "R grew up in Idaho dummy (pre)"
replace r_id=0 if inrange(V2015752, 1, 15) | inrange(V2015752, 17, 59)
replace r_id=1 if V2015752==16
label values r_id vallab1

gen r_il = V2015752
label variable r_il "R grew up in Illinois dummy (pre)"
replace r_il=0 if inrange(V2015752, 1, 16) | inrange(V2015752, 18, 59)
replace r_il=1 if V2015752==17
label values r_il vallab1

gen r_in = V2015752
label variable r_in "R grew up in Indiana dummy (pre)"
replace r_in=0 if inrange(V2015752, 1, 17) | inrange(V2015752, 19, 59)
replace r_in=1 if V2015752==18
label values r_in vallab1

gen r_ia = V2015752
label variable r_ia "R grew up in Iowa dummy (pre)"
replace r_ia=0 if inrange(V2015752, 1, 18) | inrange(V2015752, 20, 59)
replace r_ia=1 if V2015752==19
label values r_ia vallab1

gen r_ks = V2015752
label variable r_ks "R grew up in Kansas dummy (pre)"
replace r_ks=0 if inrange(V2015752, 1, 19) | inrange(V2015752, 21, 59)
replace r_ks=1 if V2015752==20
label values r_ks vallab1

gen r_ky = V2015752
label variable r_ky "R grew up in Kentucky dummy (pre)"
replace r_ky=0 if inrange(V2015752, 1, 20) | inrange(V2015752, 22, 59)
replace r_ky=1 if V2015752==21
label values r_ky vallab1

gen r_la = V2015752
label variable r_la "R grew up in Louisiana dummy (pre)"
replace r_la=0 if inrange(V2015752, 1, 21) | inrange(V2015752, 23, 59)
replace r_la=1 if V2015752==22
label values r_la vallab1

gen r_me = V2015752
label variable r_me "R grew up in Maine dummy (pre)"
replace r_me=0 if inrange(V2015752, 1, 22) | inrange(V2015752, 24, 59)
replace r_me=1 if V2015752==23
label values r_me vallab1

gen r_md = V2015752
label variable r_md "R grew up in Maryland dummy (pre)"
replace r_md=0 if inrange(V2015752, 1, 23) | inrange(V2015752, 25, 59)
replace r_md=1 if V2015752==24
label values r_md vallab1

gen r_ma = V2015752
label variable r_ma "R grew up in Massachusetts dummy (pre)"
replace r_ma=0 if inrange(V2015752, 1, 24) | inrange(V2015752, 26, 59)
replace r_ma=1 if V2015752==25
label values r_ma vallab1

gen r_mi = V2015752
label variable r_mi "R grew up in Michigan dummy (pre)"
replace r_mi=0 if inrange(V2015752, 1, 25) | inrange(V2015752, 27, 59)
replace r_mi=1 if V2015752==26
label values r_mi vallab1

gen r_mn = V2015752
label variable r_mn "R grew up in Minnesota dummy (pre)"
replace r_mn=0 if inrange(V2015752, 1, 26) | inrange(V2015752, 28, 59)
replace r_mn=1 if V2015752==27
label values r_mn vallab1

gen r_ms = V2015752
label variable r_ms "R grew up in Mississippi dummy (pre)"
replace r_ms=0 if inrange(V2015752, 1, 27) | inrange(V2015752, 29, 59)
replace r_ms=1 if V2015752==28
label values r_ms vallab1

gen r_mo = V2015752
label variable r_mo "R grew up in Missouri dummy (pre)"
replace r_mo=0 if inrange(V2015752, 1, 28) | inrange(V2015752, 30, 59)
replace r_mo=1 if V2015752==29
label values r_mo vallab1

gen r_mt = V2015752
label variable r_mt "R grew up in Montana dummy (pre)"
replace r_mt=0 if inrange(V2015752, 1, 29) | inrange(V2015752, 31, 59)
replace r_mt=1 if V2015752==30
label values r_mt vallab1

gen r_ne = V2015752
label variable r_ne "R grew up in Nebraska dummy (pre)"
replace r_ne=0 if inrange(V2015752, 1, 30) | inrange(V2015752, 32, 59)
replace r_ne=1 if V2015752==31
label values r_ne vallab1

gen r_nv = V2015752
label variable r_nv "R grew up in Nevada dummy (pre)"
replace r_nv=0 if inrange(V2015752, 1, 31) | inrange(V2015752, 33, 59)
replace r_nv=1 if V2015752==32
label values r_nv vallab1

gen r_nh = V2015752
label variable r_nh "R grew up in New Hampshire dummy (pre)"
replace r_nh=0 if inrange(V2015752, 1, 32) | inrange(V2015752, 34, 59)
replace r_nh=1 if V2015752==33
label values r_nh vallab1

gen r_nj = V2015752
label variable r_nj "R grew up in New Jersey dummy (pre)"
replace r_nj=0 if inrange(V2015752, 1, 33) | inrange(V2015752, 35, 59)
replace r_nj=1 if V2015752==34
label values r_nj vallab1

gen r_nm = V2015752
label variable r_nm "R grew up in New Mexico dummy (pre)"
replace r_nm=0 if inrange(V2015752, 1, 34) | inrange(V2015752, 36, 59)
replace r_nm=1 if V2015752==35
label values r_nm vallab1

gen r_ny = V2015752
label variable r_ny "R grew up in New York dummy (pre)"
replace r_ny=0 if inrange(V2015752, 1, 35) | inrange(V2015752, 37, 59)
replace r_ny=1 if V2015752==36
label values r_ny vallab1

gen r_nc = V2015752
label variable r_nc "R grew up in North Carolina dummy (pre)"
replace r_nc=0 if inrange(V2015752, 1, 36) | inrange(V2015752, 38, 59)
replace r_nc=1 if V2015752==37
label values r_nc vallab1

gen r_nd = V2015752
label variable r_nd "R grew up in North Dakota dummy (pre)"
replace r_nd=0 if inrange(V2015752, 1, 37) | inrange(V2015752, 39, 59)
replace r_nd=1 if V2015752==38
label values r_nd vallab1

gen r_oh = V2015752
label variable r_oh "R grew up in Ohio dummy (pre)"
replace r_oh=0 if inrange(V2015752, 1, 38) | inrange(V2015752, 40, 59)
replace r_oh=1 if V2015752==39
label values r_oh vallab1

gen r_ok = V2015752
label variable r_ok "R grew up in Oklahoma dummy (pre)"
replace r_ok=0 if inrange(V2015752, 1, 39) | inrange(V2015752, 41, 59)
replace r_ok=1 if V2015752==40
label values r_ok vallab1

gen r_or = V2015752
label variable r_or "R grew up in Oregon dummy (pre)"
replace r_or=0 if inrange(V2015752, 1, 40) | inrange(V2015752, 42, 59)
replace r_or=1 if V2015752==41
label values r_or vallab1

gen r_pa = V2015752
label variable r_pa "R grew up in Pennsylvania dummy (pre)"
replace r_pa=0 if inrange(V2015752, 1, 41) | inrange(V2015752, 43, 59)
replace r_pa=1 if V2015752==42
label values r_pa vallab1

gen r_ri = V2015752
label variable r_ri "R grew up in Rhode Island dummy (pre)"
replace r_ri=0 if inrange(V2015752, 1, 42) | inrange(V2015752, 45, 59)
replace r_ri=1 if V2015752==44
label values r_ri vallab1

gen r_sc = V2015752
label variable r_sc "R grew up in South Carolina dummy (pre)"
replace r_sc=0 if inrange(V2015752, 1, 44) | inrange(V2015752, 46, 59)
replace r_sc=1 if V2015752==45
label values r_sc vallab1

gen r_sd = V2015752
label variable r_sd "R grew up in South Dakota dummy (pre)"
replace r_sd=0 if inrange(V2015752, 1, 45) | inrange(V2015752, 47, 59)
replace r_sd=1 if V2015752==46
label values r_sd vallab1

gen r_te = V2015752
label variable r_te "R grew up in Tennessee dummy (pre)"
replace r_te=0 if inrange(V2015752, 1, 46) | inrange(V2015752, 48, 59)
replace r_te=1 if V2015752==47
label values r_te vallab1

gen r_tx = V2015752
label variable r_tx "R grew up in Texas dummy (pre)"
replace r_tx=0 if inrange(V2015752, 1, 47) | inrange(V2015752, 49, 59)
replace r_tx=1 if V2015752==48
label values r_tx vallab1

gen r_ut = V2015752
label variable r_ut "R grew up in Utah dummy (pre)"
replace r_ut=0 if inrange(V2015752, 1, 48) | inrange(V2015752, 50, 59)
replace r_ut=1 if V2015752==49
label values r_ut vallab1

gen r_vt = V2015752
label variable r_vt "R grew up in Vermont dummy (pre)"
replace r_vt=0 if inrange(V2015752, 1, 49) | inrange(V2015752, 51, 59)
replace r_vt=1 if V2015752==50
label values r_vt vallab1

gen r_va = V2015752
label variable r_va "R grew up in Virginia dummy (pre)"
replace r_va=0 if inrange(V2015752, 1, 50) | inrange(V2015752, 52, 59)
replace r_va=1 if V2015752==51
label values r_va vallab1

gen r_wa = V2015752
label variable r_wa "R grew up in Washington dummy (pre)"
replace r_wa=0 if inrange(V2015752, 1, 51) | inrange(V2015752, 54, 59)
replace r_wa=1 if V2015752==53
label values r_wa vallab1

gen r_wv = V2015752
label variable r_wv "R grew up in West Virginia dummy (pre)"
replace r_wv=0 if inrange(V2015752, 1, 53) | inrange(V2015752, 55, 59)
replace r_wv=1 if V2015752==54
label values r_wv vallab1

gen r_wi = V2015752
label variable r_wi "R grew up in Wisconsin dummy (pre)"
replace r_wi=0 if inrange(V2015752, 1, 54) | inrange(V2015752, 56, 59)
replace r_wi=1 if V2015752==55
label values r_wi vallab1

gen r_wy = V2015752
label variable r_wy "R grew up in Wyoming dummy (pre)"
replace r_wy=0 if inrange(V2015752, 1, 55) | inrange(V2015752, 57, 59)
replace r_wy=1 if V2015752==56
label values r_wy vallab1

gen r_pr = V2015752
label variable r_pr "R grew up in Puerto Rico dummy (pre)"
replace r_pr=0 if inrange(V2015752, 1, 56) | inrange(V2015752, 58, 59)
replace r_pr=1 if V2015752==57
label values r_pr vallab1

gen r_us_terr = V2015752
label variable r_us_terr "R grew up in another US territory dummy (pre)"
replace r_us_terr=0 if inrange(V2015752, 1, 57) | V2015752==59
replace r_us_terr=1 if V2015752==58
label values r_us_terr vallab1

gen r_other_country = V2015752
label variable r_other_country "R grew up in another country dummy (pre)"
replace r_other_country=0 if inrange(V2015752, 1, 58)
replace r_other_country=1 if V2015752==59
label values r_other_country

tab V2015752
codebook r_al
codebook r_ak
codebook r_az
codebook r_ar
codebook r_ca
codebook r_co
codebook r_ct
codebook r_de
codebook r_dc
codebook r_fl
codebook r_ga
codebook r_ha
codebook r_id
codebook r_il
codebook r_in
codebook r_ia
codebook r_ks
codebook r_ky
codebook r_la
codebook r_me
codebook r_md
codebook r_ma
codebook r_mi
codebook r_mn
codebook r_ms
codebook r_mo
codebook r_ne
codebook r_nv
codebook r_nh
codebook r_nj
codebook r_nm
codebook r_ny
codebook r_nc
codebook r_nd
codebook r_oh
codebook r_ok
codebook r_or
codebook r_pa
codebook r_ri
codebook r_sc
codebook r_sd
codebook r_te
codebook r_tx
codebook r_ut
codebook r_vt
codebook r_va
codebook r_wa
codebook r_wv
codebook r_wi
codebook r_wy
codebook r_pr
codebook r_us_terr
codebook r_other_country

codebook V201575z
///All -2///

codebook V201576
gen community_yrs = V201576
label variable community_yrs "How long lived in this community YRS (pre)"
replace community_yrs=. if V201576==-9 | V201576==-8
label define vallab100 40 "Fourty or more years"
label values community_yrs vallab100
codebook V201576
codebook community_yrs

*codebook V201577
///All -3///
*codebook V201578x
///All -2///
*codebook V201579
///All -3///
*codebook V201580
///All -3///

codebook V201581
gen pay_rent = V201581
label variable pay_rent "Home tenure pay rent dummy (pre)"
replace pay_rent=. if V201581==-9 | V201581==-8 | V201581==-1
replace pay_rent=0 if inrange(V201581, 2, 4)
label values pay_rent vallab1
codebook V201581
codebook pay_rent

gen pay_mortgage = V201581
label variable pay_mortgage "Home tenure pay mortgage dummy (pre)"
replace pay_mortgage=. if inrange(V201581, -9, -1)
replace pay_mortgage=1 if V201581==2
replace pay_mortgage=0 if V201581==1 | V201581==3 | V201581==4
label values pay_mortgage vallab1
codebook V201581
codebook pay_mortgage

gen own_home = V201581
label variable own_home "Home tenure own home with no payments due dummy (pre)"
replace own_home=. if inrange(V201581, -9, -1)
replace own_home=1 if V201581==3
replace own_home=0 if V201581==1 | V201581==2 | V201581==4
label values own_home vallab1
codebook V201581
codebook own_home

gen other_home_deal = V201581
label variable other_home_deal "home tenure some other arrangement dummy (pre)"
replace other_home_deal=. if inrange(V201581, -9, -1)
replace other_home_deal=1 if V201581==4
replace other_home_deal=0 if inrange(V201581, 1, 3)
label values other_home_deal vallab1
codebook V201581
codebook other_home_deal

codebook V201582
gen hhmember_own_home = V201582
label variable hhmember_own_home "Home tenure CPS owned or being bought by household member dummy (pre)"
replace hhmember_own_home=. if inrange(V201582, -9, -1)
replace hhmember_own_home=0 if V201582==2 | V201582==3
label values hhmember_own_home vallab1
codebook V201582
codebook hhmember_own_home

gen rent_cash = V201582
label variable rent_cash "Home tenure CPS rented for cash dummy (pre)"
replace rent_cash=. if inrange(V201582, -9, -1)
replace rent_cash=1 if V201582==2
replace rent_cash=0 if V201582==1 | V201582==3
label values rent_cash vallab1
codebook V201582
codebook rent_cash

gen no_cash_rent = V201582
label variable no_cash_rent "Home tenure CPS occupied without payment of case rent dummy (pre)"
replace no_cash_rent=. if inrange(V201582, -9, -1)
replace no_cash_rent=1 if V201582==3
replace no_cash_rent=0 if V201582==1 | V201582==2
label values no_cash_rent vallab1
codebook V201582
codebook no_cash_rent

codebook V201583
gen hhmember_pay_mortgage = V201583
label variable hhmember_pay_mortgage "Does HH member pay mortgage dummy (pre)"
replace hhmember_pay_mortgage=. if inrange(V201583, -9, -1)
replace hhmember_pay_mortgage=0 if V201583==2
label values hhmember_pay_mortgage vallab1
codebook V201583
codebook hhmember_pay_mortgage

gen hhmember_no_pay = V201583
label variable hhmember_no_pay "Does HH member own home with no payments due dummy (pre)"
replace hhmember_no_pay=. if inrange(V201583, -9, -1)
replace hhmember_no_pay=0 if V201583==1
replace hhmember_no_pay=1 if V201583==2
label values hhmember_no_pay vallab1
codebook V201583
codebook hhmember_no_pay

codebook V201584
gen name_change = V201584
label variable name_change "R name ever changed dummy (pre)"
replace name_change=. if V201584==-9 | V201584==-8
replace name_change=0 if V201584==2
label values name_change vallab1
codebook V201584
codebook name_change

codebook V201585
///All -3///
codebook V201586
gen alt_name = V201586
label variable alt_name "Use of alternate names dummy (pre)"
replace alt_name=. if V201586==-9 | V201586==-8
replace alt_name=0 if V201586==2
label values alt_name vallab1
codebook V201586
codebook alt_name

codebook V201587
gen address_yrs = V201587
label variable address_yrs "Years R lived at address (pre)"
replace address_yrs=. if V201587==-9
label values address_yrs vallab193
codebook V201587
codebook address_yrs

codebook V201588
///All -3///
codebook V201589
gen gov_id = V201589
label variable gov_id "non-expired Government ID (driver's license) dummy (pre)"
replace gov_id=. if V201589==-9 | V201589==-8
replace gov_id=0 if V201589==2
label values gov_id vallab1
codebook V201589
codebook gov_id

codebook V201590
gen have_passport = V201590
label variable have_passport "Have valid US passport dummy (pre)"
replace have_passport=. if V201590==-9 | V201590==-8
replace have_passport=0 if V201590==2
label values have_passport vallab1
codebook V201590
codebook have_passport

codebook V201591
gen diff_id = V201591
label variable diff_id "Have another form (than drivers license) ID dummy (pre)"
replace diff_id=. if V201591==-9 | V201591==-1
replace diff_id=0 if V201591==2
label values diff_id vallab1
codebook V201591
codebook diff_id

codebook V201592
gen hlthcare_delay = V201592
label variable hlthcare_delay "Has someone in HH put off checkup and vaccines over the last year dummy (pre)"
replace hlthcare_delay=. if V201592==-9 | V201592==-8
replace hlthcare_delay=0 if V201592==2
label values hlthcare_delay vallab1
codebook V201592
codebook hlthcare_delay

codebook V201593
gen hlthcare_pay = V201593
label variable hlthcare_pay "How likely R able to pay all healthcare costs in next 12 months (pre)"
replace hlthcare_pay=. if V201593==-9 | V201593==-8
replace hlthcare_pay=0 if V201593==5
replace hlthcare_pay=1 if V201593==4
replace hlthcare_pay=2 if V201593==3
replace hlthcare_pay=3 if V201593==2
replace hlthcare_pay=4 if V201593==1
label values hlthcare_pay vallab12
codebook V201593
codebook hlthcare_pay

codebook V201594
gen finance_worry = V201594
label variable finance_worry "How worried is R about current financial situation (pre)"
replace finance_worry=. if V201594==-9 | V201594==-8
replace finance_worry=0 if V201594==5
replace finance_worry=1 if V201594==4
replace finance_worry=2 if V201594==3
replace finance_worry=3 if V201594==2
replace finance_worry=4 if V201594==1
label values finance_worry vallab48
codebook V201594
codebook finance_worry

codebook V201595
gen housing_pay = V201595
label variable housing_pay "How likely R able to make all housing payments in next 12 months (pre)"
replace housing_pay=. if V201595==-9 | V201595==-1
replace housing_pay=0 if V201595==5
replace housing_pay=1 if V201595==4
replace housing_pay=2 if V201595==3
replace housing_pay=3 if V201595==2
replace housing_pay=4 if V201595==1
label values housing_pay vallab12
codebook V201595
codebook housing_pay

codebook V201596
gen lost_job = V201596
label variable lost_job "Anyone in family or friend who lost a job dummy (pre)"
replace lost_job=. if V201596==-9 | V201596==-8
replace lost_job=0 if V201596==2
label values lost_job vallab1
codebook V201596
codebook lost_job

codebook V201600
gen male = V201600
label variable male "R is male dummy (pre)"
replace male=. if V201600==-9
replace male=0 if V201600==2
label values male vallab1
codebook V201600
codebook male

gen female = V201600
label variable female "R is female dummy (pre)"
replace female=. if V201600==-9
replace female=1 if V201600==2
replace female=0 if V201600==1
label values female vallab1
codebook V201600
codebook female

codebook V201601
gen r_heterosexual = V201601
label variable r_heterosexual "R identifies as heterosexual or straight dummy (pre)"
replace r_heterosexual=. if V201601==-9 | V201601==-5
replace r_heterosexual=0 if V201601==2 | V201601==3 | V201601==4
label values r_heterosexual vallab1
codebook V201601
codebook r_heterosexual

gen r_homosexual = V201601
label variable r_homosexual "R identifies as homosexual or gay (or lesbian) dummy (pre)"
replace r_homosexual=. if V201601==-9 | V201601==-5
replace r_homosexual=1 if V201601==2
replace r_homosexual=0 if V201601==1 | V201601==3 | V201601==4
label values r_homosexual vallab1
codebook V201601
codebook r_homosexual

gen r_bisexual = V201601
label variable r_bisexual "R identifies as bisexual dummy (pre)"
replace r_bisexual=. if V201601==-9 | V201601==-5
replace r_bisexual=1 if V201601==3
replace r_bisexual=0 if V201601==1 | V201601==2 | V201601==4
label values r_bisexual vallab1
codebook V201601
codebook r_bisexual

gen r_other_sexuality = V201601
label variable r_other_sexuality "R identifies as a sexual orientation not listed (specified by R) dummy (pre)"
replace r_other_sexuality=. if V201601==-9 | V201601==-5
replace r_other_sexuality=1 if V201601==4
replace r_other_sexuality=0 if V201601==1 | V201601==2 | V201601==3
label values r_other_sexuality vallab1
codebook V201601
codebook r_other_sexuality

codebook V201601z
///All -2///

codebook V201602
gen just_violence = V201602
label variable just_violence "Justified to use violence (pre)"
replace just_violence=. if V201602==-9 | V201602==-5
replace just_violence=0 if V201602==1
replace just_violence=1 if V201602==2
replace just_violence=2 if V201602==3
replace just_violence=3 if V201602==4
replace just_violence=4 if V201602==5
label values just_violence vallab21
codebook V201602
codebook just_violence

codebook V201603
gen violence_change = V201603
label variable violence_change "Political violence compared to 4 years ago (pre)"
replace violence_change=. if V201603==-9 | V201603==-5
replace violence_change=1 if V201603==2
replace violence_change=2 if V201603==3
replace violence_change=3 if V201603==1
label values violence_change vallab42
codebook V201603
codebook violence_change

codebook V201605x
gen violence_change_sum = V201605x
label variable violence_change_sum "Summary: political violence compared to 4 years ago (pre)"
replace violence_change_sum=. if V201605x==-5 | V201605x==-2
replace violence_change_sum=1 if V201605x==7
replace violence_change_sum=2 if V201605x==6
replace violence_change_sum=3 if V201605x==5
replace violence_change_sum=5 if V201605x==3
replace violence_change_sum=6 if V201605x==2
replace violence_change_sum=7 if V201605x==1
label values violence_change_sum vallab70
codebook V201605x
codebook violence_change_sum

codebook V201606
gen stock_dummy = V201606
label variable stock_dummy "Money invested in Stock Market dummy (pre)"
replace stock_dummy=. if V201606==-9 | V201606==-8 | V201606==-5
replace stock_dummy=0 if V201606==2
label values stock_dummy vallab1
codebook V201606
codebook stock_dummy

///V201607-V201616 all -3///
codebook V201617x
gen hh_income_sum = V201617x
label variable hh_income_sum "Summary: Total HH income (pre)"
replace hh_income_sum=. if V201617x==-9 | V201617x==-5
label define vallab101 1 "Under $9,999" 2 "$10,000-14,999" 3 "$15,000-19,999" 4 "$20,000-24,999" 5 "$25,000-29,999" 6 "$30,000-34,999" 7 "$35,000-39,999" 8 "$40,000-44,999" 9 "$45,000-49,999" 10 "$50,000-59,999" 11 "$60,000-64,999" 12 "$65,000-69,999" 13 "$70,000-74,999" 14 "$75,000-79,999" 15 "$80,000-89,999" 16 "$90,000-99,999" 17 "$100,000-109,999" 18 "$110,000-124,999" 19 "$125,000-149,999" 20 "$150,000-174,999" 21 "$175,000-249,999" 22 "$250,000 or more"
label values hh_income_sum vallab101
codebook V201617x
codebook hh_income_sum

codebook V201618
gen conc_trouble = V201618
label variable conc_trouble "Trouble concentrating in past week (pre)"
replace conc_trouble=. if V201618==-9 | V201618==-5
replace conc_trouble=0 if V201618==5
replace conc_trouble=1 if V201618==4
replace conc_trouble=2 if V201618==3
replace conc_trouble=3 if V201618==2
replace conc_trouble=4 if V201618==1
label define vallab102 0 "Never" 1 "Rarely" 2 "Sometimes" 3 "Often" 4 "All the time"
label values conc_trouble vallab102
codebook V201618
codebook conc_trouble

codebook V201619
gen restless_sleep = V201619
label variable restless_sleep "Restless sleep in past week (pre)"
replace restless_sleep=. if V201619==-9 | V201619==-5
replace restless_sleep=0 if V201619==5
replace restless_sleep=1 if V201619==4
replace restless_sleep=2 if V201619==3
replace restless_sleep=3 if V201619==2
replace restless_sleep=4 if V201619==1
label values restless_sleep vallab102
codebook V201619
codebook restless_sleep

codebook V201620
gen have_hlth_ins = V201620
label variable have_hlth_ins "Does R have health insurance dummy (pre)"
replace have_hlth_ins=. if V201620==-9 | V201620==-5
replace have_hlth_ins=0 if V201620==2
label values have_hlth_ins vallab1
codebook V201620
codebook have_hlth_ins

codebook V201621
gen lose_hlthcare_concern = V201621
label variable lose_hlthcare_concern "R concerned about losing health insurance (pre)"
replace lose_hlthcare_concern=. if V201621==-9 | V201621==-5 | V201621==-1
replace lose_hlthcare_concern=0 if V201621==1
replace lose_hlthcare_concern=1 if V201621==2
replace lose_hlthcare_concern=2 if V201621==3
replace lose_hlthcare_concern=3 if V201621==4
replace lose_hlthcare_concern=4 if V201621==5
label values lose_hlthcare_concern vallab67
codebook V201621
codebook lose_hlthcare_concern

codebook V201622
gen pay_hlthcare_concern = V201622
label variable pay_hlthcare_concern "R concerned about paying for health care (pre)"
replace pay_hlthcare_concern=. if V201622==-9 | V201622==-5
replace pay_hlthcare_concern=0 if V201622==1
replace pay_hlthcare_concern=1 if V201622==2
replace pay_hlthcare_concern=2 if V201622==3
replace pay_hlthcare_concern=3 if V201622==4
replace pay_hlthcare_concern=4 if V201622==5
label values pay_hlthcare_concern vallab67
codebook V201622
codebook pay_hlthcare_concern

codebook V201623
gen r_hlth = V201623
label variable r_hlth "Health of R (pre)"
replace r_hlth=. if V201623==-9 | V201623==-5
replace r_hlth=1 if V201623==5
replace r_hlth=2 if V201623==4
replace r_hlth=4 if V201623==2
replace r_hlth=5 if V201623==1
label define vallab103 1 "Poor" 2 "Fair" 3 "Good" 4 "Very Good" 5 "Excellent"
label values r_hlth vallab103
codebook V201623
codebook r_hlth

codebook V201624
gen hh_test_pos = V201624
label variable hh_test_pos "Anyone in household tested pos for COVID-19 dummy (pre)"
replace hh_test_pos=. if V201624==-9 | V201624==-5
replace hh_test_pos=0 if V201624==2
label values hh_test_pos vallab1
codebook V201624
codebook hh_test_pos

codebook V201625
gen hh_suspect_pos = V201625
label variable hh_suspect_pos "Anyone in household suspected of COVID-19 based on symptoms dummy (pre)"
replace hh_suspect_pos=. if V201625==-9 | V201625==-5
replace hh_suspect_pos=0 if V201625==2
label values hh_suspect vallab1
codebook V201625
codebook hh_suspect_pos

codebook V201626
gen pol_correct = V201626
label variable pol_correct "Need to be more sensitive talking or people too easily offended (pre)"
replace pol_correct=. if V201626==-9 | V201626==-5
replace pol_correct=1 if V201626==4
replace pol_correct=2 if V201626==3
replace pol_correct=3 if V201626==2
replace pol_correct=4 if V201626==1
label define vallab104 1 "People are much too easily offended" 2 "People are a little too easily offended" 3 "The way people talk needs to change a little" 4 "The way people talk needs to change a lot"
label values pol_correct vallab104
codebook V201626
codebook pol_correct

codebook V201627
gen self_censor = V201627
label variable self_censor "How often self censor (pre)"
replace self_censor=. if V201627==-9 | V201627==-5
replace self_censor=0 if V201627==1
replace self_censor=1 if V201627==2
replace self_censor=2 if V201627==3
replace self_censor=3 if V201627==4
replace self_censor=4 if V201627==5
label values self_censor vallab59
codebook V201627
codebook self_censor

codebook V201628
gen gun_number = V201628
label variable gun_number "How many Guns owned (pre)"
replace gun_number=. if V201628==-9 | V201628==-5
codebook V201628
codebook gun_number

codebook V201629a
gen follow_tv = V201629a
label variable follow_tv "R used tv programs to follow presidential campaign dummy (pre)"
replace follow_tv=. if V201629a==-9 | V201629a==-5
label values follow_tv vallab1
codebook V201629a
codebook follow_tv

codebook V201629b
gen follow_papers = V201629b
label variable follow_papers "R used newspapers to follow presidential campaign dummy (pre)"
replace follow_papers=. if V201629b==-9 | V201629b==-5
label values follow_papers vallab1
codebook V201629b
codebook follow_papers

codebook V201629c
gen follow_internet = V201629c
label variable follow_internet "R used internet sites to follow presidential campaign dummy (pre)"
replace follow_internet=. if V201629c==-9 | V201629c==-5
label values follow_internet vallab1
codebook V201629c
codebook follow_internet

codebook V201629d
gen follow_radio = V201629d
label variable follow_radio "R used radio news to follow the presidential election dummy (pre)"
replace follow_radio=. if V201629d==-9 | V201629d==-5
label values follow_radio vallab1
codebook V201629d
codebook follow_radio

codebook V201629e
gen follow_none = V201629e
label variable follow_none "R didn't use tv, newspapers, internet sites, or radio to follow the presidential election dummy (pre)"
replace follow_none=. if V201629e==-9 | V201629e==-5
label values follow_none vallab1
codebook V201629e
codebook follow_none

codebook V201630a
gen watch_colbert = V201630a
label variable watch_colbert "R regularly watches The Late Show with Stephen Colbert dummy (pre)"
replace watch_colbert=. if V201630a==-9 | V201630a==-5 | V201630a==-1
label values watch_colbert vallab1
codebook V201630a
codebook watch_colbert

codebook V201630b
gen watch_hannity = V201630b
label variable watch_hannity "R regularly watches Hannity dummy (pre)"
replace watch_hannity=. if V201630b==-9 | V201630b==-5 | V201630b==-1
label values watch_hannity vallab1
codebook V201630b
codebook watch_hannity

codebook V201630c
gen watch_tucker = V201630c
label variable watch_tucker "R regularly watches Tucker Carlson Tonight dummy (pre)"
replace watch_tucker=. if inrange(V201630c, -9, -1)
label values watch_tucker vallab1
codebook V201630c
codebook watch_tucker

codebook V201630d
gen watch_maddow = V201630d
label variable watch_maddow "R regularly watches The Rachel Maddow Show dummy (pre)"
replace watch_maddow=. if inrange(V201630d, -9, -1)
label values watch_maddow vallab1
codebook V201630d
codebook watch_maddow

codebook V201630e
gen watch_last_word = V201630e
label variable watch_last_word "R regularly watches The Last Word with Lawrence O'Donnell dummy (pre)"
replace watch_last_word=. if inrange(V201630e, -9, -1)
label values watch_last_word vallab1
codebook V201630e
codebook watch_last_word

codebook V201630f
gen watch_the_five = V201630f
label variable watch_the_five "R regularly watches The Five dummy (pre)"
replace watch_the_five=. if inrange(V201630f, -9, -1)
label values watch_the_five vallab1
codebook V201630f
codebook watch_the_five

codebook V201630g
gen watch_ingraham = V201630g
label variable watch_ingraham "R regularly watches The Ingraham Angle dummy (pre)"
replace watch_ingraham=. if inrange(V201630g, -9, -1)
label values watch_ingraham vallab1
codebook V201630g
codebook watch_ingraham

codebook V201630h
gen watch_maccallum = V201630h
label variable watch_maccallum "R regularly watches The Story with Martha MacCallum dummy (pre)"
replace watch_maccallum=. if inrange(V201630h, -9, -1)
label values watch_maccallum vallab1
codebook V201630h
codebook watch_maccallum

codebook V201630i
gen watch_tapper = V201630i
label variable watch_tapper "R regularly watches The Lead with Jake Tapper dummy (pre)"
replace watch_tapper=. if inrange(V201630i, -9, -1)
label values watch_tapper vallab1
codebook V201630i
codebook watch_tapper

codebook V201630j
gen watch_cooper = V201630j
label variable watch_cooper "R regularly watches Anderson Cooper 360 dummy (pre)"
replace watch_cooper=. if inrange(V201630j, -9, -1)
label values watch_cooper vallab1
codebook V201630j
codebook watch_cooper

codebook V201630k
gen watch_baier = V201630k
label variable watch_baier "R regularly watches Special Report with Bret Baier dummy (pre)"
replace watch_baier=. if inrange(V201630k, -9, -1)
label values watch_baier vallab1
codebook V201630k
codebook watch_baier

codebook V201630m
gen watch_cbs_evening = V201630m
label variable watch_cbs_evening "R regularly watches CBS Evening News with Norah O'Donnell dummy (pre)"
replace watch_cbs_evening=. if inrange(V201630m, -9, -1)
label values watch_cbs_evening vallab1
codebook V201630m
codebook watch_cbs_evening

codebook V201630n
gen watch_abc_world = V201630n
label variable watch_abc_world "R regularly watches ABC World News Tonight dummy (pre)"
replace watch_abc_world=. if inrange(V201630n, -9, -1)
label values watch_abc_world vallab1
codebook V201630n
codebook watch_abc_world

codebook V201630p
gen watch_holt = V201630p
label variable watch_holt "R regularly watches NBC Nightly News with Lester Holt dummy (pre)"
replace watch_holt=. if inrange(V201630p, -9, -1)
label values watch_holt vallab1
codebook V201630p
codebook watch_holt

codebook V201630q
gen watch_cuomo = V201630q
label variable watch_cuomo "R regularly watches Cuomo Prime Time dummy (pre)"
replace watch_cuomo=. if inrange(V201630q, -9, -1)
label values watch_cuomo vallab1
codebook V201630q
codebook watch_cuomo

codebook V201630r
gen watch_ncis = V201630r
label variable watch_ncis "R regularly watches NCIS dummy (pre)"
replace watch_ncis=. if inrange(V201630r, -9, -1)
label values watch_ncis vallab1
codebook V201630r
codebook watch_ncis

codebook V201630s
gen first_watch_none = V201630s
label variable first_watch_none "R does not watch any of the first set (Colbert through NCIS) of TV programs dummy (pre)"
replace first_watch_none=. if inrange(V201630s, -9, -1)
label values first_watch_none vallab1
codebook V201630s
codebook first_watch_none

codebook V201631a
gen watch_american_idol = V201631a
label variable watch_american_idol "R regularly watches American Idol dummy (pre)"
replace watch_american_idol=. if inrange(V201631a, -9, -1)
label values watch_american_idol vallab1
codebook V201631a
codebook watch_american_idol

codebook V201631b
gen watch_burnett = V201631b
label variable watch_burnett "R regularly watches Erin Burnett OutFront dummy (pre)"
replace watch_burnett=. if inrange(V201631b, -9, -1)
label values watch_burnett vallab1
codebook V201631b
codebook watch_burnett

codebook V201631c
gen watch_60_min = V201631c
label variable watch_60_min "R regularly watches 60 Minutes dummy (pre)"
replace watch_60_min=. if inrange(V201631c, -9, -1)
label values watch_60_min vallab1
codebook V201631c
codebook watch_60_min

codebook V201631d
gen watch_2020 = V201631d
label variable watch_2020 "R regularly watches 20/20 dummy (pre)"
replace watch_2020=. if inrange(V201631d, -9, -1)
label values watch_2020 vallab1
codebook V201631d
codebook watch_2020

codebook V201631e
gen watch_dateline = V201631e
label variable watch_dateline "R regularly watches Dateline NBC dummy (pre)"
replace watch_dateline=. if inrange(V201631e, -9, -1)
label values watch_dateline vallab1
codebook V201631e
codebook watch_dateline

codebook V201631f
gen watch_ftn = V201631f
label variable watch_ftn "R regularly watches Face the Nation dummy (pre)"
replace watch_ftn=. if inrange(V201631f, -9, -1)
label values watch_ftn vallab1
codebook V201631f
codebook watch_ftn

codebook V201631g
gen watch_mtp = V201631g
label variable watch_mtp "R regularly watches Meet the Press dummy (pre)"
replace watch_mtp=. if inrange(V201631g, -9, -1)
label values watch_mtp vallab1
codebook V201631g
codebook watch_mtp

codebook V201631h
gen watch_cbs_morning = V201631h
label variable watch_cbs_morning "R regularly watches CBS This Morning dummy (pre)"
replace watch_cbs_morning=. if inrange(V201631h, -9, -1)
label values watch_cbs_morning vallab1
codebook V201631h
codebook watch_cbs_morning

codebook V201631i
gen watch_gma = V201631i
label variable watch_gma "R regularly watches Good Morning America dummy (pre)"
replace watch_gma=. if inrange(V201631i, -9, -1)
label values watch_gma vallab1
codebook V201631i
codebook watch_gma

codebook V201631j
gen watch_nbc_today = V201631j
label variable watch_nbc_today "R regularly watches Today (NBC) dummy (pre)"
replace watch_nbc_today=. if inrange(V201631j, -9, -1)
label values watch_nbc_today vallab1
codebook V201631j
codebook watch_nbc_today

codebook V201631k
gen watch_fox_friends = V201631k
label variable watch_fox_friends "R regularly watches Fox & Friends dummy (pre)"
replace watch_fox_friends=. if inrange(V201631k, -9, -1)
label values watch_fox_friends vallab1
codebook V201631k
codebook watch_fox_friends

codebook V201631m
gen watch_morning_joe = V201631m
label variable watch_morning_joe "R regularly watches Morning Joe dummy (pre)"
replace watch_morning_joe=. if inrange(V201631m, -9, -1)
label values watch_morning_joe vallab1
codebook V201631m
codebook watch_morning_joe

codebook V201631n
gen watch_all_in = V201631n
label variable watch_all_in "R regularly watches All In with Chris Hayes dummy (pre)"
replace watch_all_in=. if inrange(V201631n, -9, -1)
label values watch_all_in vallab1
codebook V201631n
codebook watch_all_in

codebook V201631p
gen watch_11_hr = V201631p
label variable watch_11_hr "R regularly watches The 11th Hour with Brian Williams dummy (pre)"
replace watch_11_hr=. if inrange(V201631p, -9, -1)
label values watch_11_hr vallab1
codebook V201631p
codebook watch_11_hr

codebook V201631q
gen watch_pbs_news = V201631q
label variable watch_pbs_news "R regularly watches PBS NewsHour dummy (pre)"
replace watch_pbs_news=. if inrange(V201631q, -9, -1)
label values watch_pbs_news vallab1
codebook V201631q
codebook watch_pbs_news

codebook V201631r
gen watch_snl = V201631r
label variable watch_snl "R regularly watches Saturday Night Live dummy (pre)"
replace watch_snl=. if inrange(V201631r, -9, -1)
label values watch_snl vallab1
codebook V201631r
codebook watch_snl

codebook V201631s
gen second_watch_none = V201631s
label variable second_watch_none "R regularly watches none of the second set (American Idol through Saturday Night Live) of TV programs dummy (pre)"
replace second_watch_none=. if inrange(V201631s, -9, -1)
label values second_watch_none vallab1
codebook V201631s
codebook second_watch_none

codebook V201632a
gen watch_punto = V201632a
label variable watch_punto "R regularly watches Al Punto dummy (pre)"
replace watch_punto=. if inrange(V201632a, -9, -1)
label values watch_punto vallab1
codebook V201632a
codebook watch_punto

codebook V201632b
gen watch_rojo = V201632b
label variable watch_rojo "R regularly watches Al Rojo Vivo dummy (pre)"
replace watch_rojo=. if inrange(V201632b, -9, -1)
label values watch_rojo vallab1
codebook V201632b
codebook watch_rojo

codebook V201632c
gen watch_eterno = V201632c
label variable watch_eterno "R regularly watches Amor Eterno dummy (pre)"
replace watch_eterno=. if inrange(V201632c, -9, -1)
label values watch_eterno vallab1
codebook V201632c
codebook watch_eterno

codebook V201632d
gen watch_aqui_ahora = V201632d
label variable watch_aqui_ahora "R regularly watches Aqui y Ahroa dummy (pre)"
replace watch_aqui_ahora=. if inrange(V201632d, -9, -1)
label values watch_aqui_ahora vallab1
codebook V201632d
codebook watch_aqui_ahora

codebook V201632e
gen watch_cronicas = V201632e
label variable watch_cronicas "R regularly watches Cronicas de Sabado dummy (pre)"
replace watch_cronicas=. if inrange(V201632e, -9, -1)
label values watch_cronicas vallab1
codebook V201632e
codebook watch_cronicas

codebook V201632f
gen watch_despierta = V201632f
label variable watch_despierta "R regularly watches Despierta America dummy (pre)"
replace watch_despierta=. if inrange(V201632f, -9, -1)
label values watch_despierta vallab1
codebook V201632f
codebook watch_despierta

codebook V201632g
gen watch_enfoque = V201632g
label variable watch_enfoque "R regularly watches Enfoque dummy (pre)"
replace watch_enfoque=. if inrange(V201632g, -9, -1)
label values watch_enfoque vallab1
codebook V201632g
codebook watch_enfoque

codebook V201632h
gen watch_hoy = V201632h
label variable watch_hoy "R regularly watches Hoy dummy (pre)"
replace watch_hoy=. if inrange(V201632h, -9, -1)
label values watch_hoy vallab1
codebook V201632h
codebook watch_hoy

codebook V201632i
gen watch_caso_cerrado = V201632i
label variable watch_caso_cerrado "R regularly watches Lo Mejor de Caso Cerrado dummy (pre)"
replace watch_caso_cerrado=. if inrange(V201632i, -9, -1)
label values watch_caso_cerrado vallab1
codebook V201632i
codebook watch_caso_cerrado

codebook V201632j
gen watch_estrella = V201632j
label variable watch_estrella "R regularly watches Noticiero Estrella TV dummy (pre)"
replace watch_estrella=. if inrange(V201632j, -9, -1)
label values watch_estrella vallab1
codebook V201632j
codebook watch_estrella

codebook V201632k
gen watch_telemundo = V201632k
label variable watch_telemundo "R regularly watches Noticiero Telemundo dummy (pre)"
replace watch_telemundo=. if inrange(V201632k, -9, -1)
label values watch_telemundo vallab1
codebook V201632k
codebook watch_telemundo

codebook V201632m
gen watch_univision = V201632m
label variable watch_univision "R regularly watches Noticiero Univision dummy (pre)"
replace watch_univision=. if inrange(V201632m, -9, -1)
label values watch_univision vallab1
codebook V201632m
codebook watch_univision

codebook V201632n
gen watch_nuevo_dia = V201632n
label variable watch_nuevo_dia "R regularly watches Un Nuevo Dia dummy (pre)"
replace watch_nuevo_dia=. if inrange(V201632n, -9, -1)
label values watch_nuevo_dia
codebook V201632n
codebook watch_nuevo_dia

codebook V201632p
gen watch_impacto = V201632p
label variable watch_impacto "R regularly watches Primer Impacto dummy (pre)"
replace watch_impacto=. if inrange(V201632p, -9, -1)
label values watch_impacto vallab1
codebook V201632p
codebook watch_impacto

codebook V201632q
gen watch_que_noche = V201632q
label variable watch_que_noche "R regularly watches Que Noche! con Angelica y Raul dummy (pre)"
replace watch_que_noche=. if inrange(V201632q, -9, -1)
label values watch_que_noche vallab1
codebook V201632q
codebook watch_que_noche

codebook V201632r
gen watch_senor_cielos = V201632r
label variable watch_senor_cielos "R regularly watches El Senor de los Cielos dummy (pre)"
replace watch_senor_cielos=. if inrange(V201632r, -9, -1)
label values watch_senor_cielos vallab1
codebook V201632r
codebook watch_senor_cielos

codebook V201632s
gen third_watch_none = V201632s
label variable third_watch_none "R regularly watches none of the third set (Al Punto-El Senor de los Cielos) of TV programs dummy (pre)"
replace third_watch_none=. if inrange(V201632s, -9, -1)
label values third_watch_none vallab1
codebook V201632s
codebook third_watch_none

codebook V201633a
gen listen_limbaugh = V201633a
label variable listen_limbaugh "R regularly listens to Rush Limbaugh dummy (pre)"
replace listen_limbaugh=. if inrange(V201633a, -9, -1)
label values listen_limbaugh vallab1
codebook V201633a
codebook listen_limbaugh

codebook V201633b
gen listen_hannity = V201633b
label variable listen_hannity "R regularly listens to The Sean Hannity Show dummy (pre)"
replace listen_hannity=. if inrange(V201633b, -9, -1)
label values listen_hannity vallab1
codebook V201633b
codebook listen_hannity

codebook V201633c
gen listen_marketplace = V201633c
label variable listen_marketplace "R regularly listens to Marketplace (NPR) dummy (pre)"
replace listen_marketplace=. if inrange(V201633c, -9, -1)
label values listen_marketplace vallab1
codebook V201633c
codebook listen_marketplace

codebook V201633d
gen listen_atc = V201633d
label variable listen_atc "R regularly listens to All Things Considered (NPR) dummy (pre)"
replace listen_atc=. if inrange(V201633d, -9, -1)
label values listen_atc vallab1
codebook V201633d
codebook listen_atc

codebook V201633e
gen listen_ramsey = V201633e
label variable listen_ramsey "R regularly listens to The Dave Ramsey Show dummy (pre)"
replace listen_ramsey=. if inrange(V201633e, -9, -1)
label values listen_ramsey vallab1
codebook V201633e
codebook listen_ramsey

codebook V201633f
gen listen_npr_morning = V201633f
label variable listen_npr_morning "R regularly listens to Morning Edition (NPR) dummy (pre)"
replace listen_npr_morning=. if inrange(V201633f, -9, -1)
label values listen_npr_morning vallab1
codebook V201633f
codebook listen_npr_morning

codebook V201633g
gen listen_levin = V201633g
label variable listen_levin "R regularly listens to The Mark Levin Show dummy (pre)"
replace listen_levin=. if inrange(V201633g, -9, -1)
label values listen_levin vallab1
codebook V201633g
codebook listen_levin

codebook V201633h
gen listen_beck = V201633h
label variable listen_beck "R regularly listens to The Glenn Beck Program dummy (pre)"
replace listen_beck=. if inrange(V201633h, -9, -1)
label values listen_beck vallab1
codebook V201633h
codebook listen_beck

codebook V201633i
gen listen_gallagher = V201633i
label variable listen_gallagher "R regularly listens to The Mike Gallagher Show dummy (pre)"
replace listen_gallagher=. if inrange(V201633i, -9, -1)
label values listen_gallagher vallab1
codebook V201633i
codebook listen_gallagher

codebook V201633j
gen listen_hewitt = V201633j
label variable listen_hewitt "R regularly listens to The Hugh Hewitt Show dummy (pre)"
replace listen_hewitt=. if inrange(V201633j, -9, -1)
label values listen_hewitt vallab1
codebook V201633j
codebook listen_hewitt

codebook V201633k
gen listen_savage = V201633k
label variable listen_savage "R regularly listens to The Savage Nation (Michael Savage) dummy (pre)"
replace listen_savage=. if inrange(V201633k, -9, -1)
label values listen_savage vallab1
codebook V201633k
codebook listen_savage

codebook V201633m
gen listen_dana = V201633m
label variable listen_dana "R regularly listens to The Dana Show dummy (pre)"
replace listen_dana=. if inrange(V201633m, -9, -1)
label values listen_dana vallab1
codebook V201633m
codebook listen_dana

codebook V201633n
gen listen_hartmann = V201633n
label variable listen_hartmann "R regularly listens to The Thom Hartmann Program dummy (pre)"
replace listen_hartmann=. if inrange(V201633n, -9, -1)
label values listen_hartmann vallab1
codebook V201633n
codebook listen_hartmann

codebook V201633p
gen listen_bohannon = V201633p
label variable listen_bohannon "R regularly listens to The Jim Bohannon Show dummy (pre)"
replace listen_bohannon=. if inrange(V201633p, -9, -1)
label values listen_bohannon vallab1
codebook V201633p
codebook listen_bohannon

codebook V201633q
gen listen_fresh_air = V201633q
label variable listen_fresh_air "R regularly listens to Fresh Air (NPR) dummy (pre)"
replace listen_fresh_air=. if inrange(V201633q, -9, -1)
label values listen_fresh_air vallab1
codebook V201633q
codebook listen_fresh_air

codebook V201633r
gen listen_none = V201633r
label variable listen_none "R regularly listens to none of the radio programs listed dummy (pre)"
replace listen_none=. if inrange(V201633r, -9, -1)
label values listen_none vallab1
codebook V201633r
codebook listen_none

codebook V201634a
gen read_yahoo = V201634a
label variable read_yahoo "R regularly reads Yahoo News (www.yahoo.com/news) dummy (pre)"
replace read_yahoo=. if inrange(V201634a, -9, -1)
label values read_yahoo vallab1
codebook V201634a
codebook read_yahoo

codebook V201634b
gen read_cnn = V201634b
label variable read_cnn "R regularly reads CNN.com dummy (pre)"
replace read_cnn=. if inrange(V201634b, -9, -1)
label values read_cnn vallab1
codebook V201634b
codebook read_cnn

codebook V201634c
gen read_huff = V201634c
label variable read_huff "R regularly reads Huffington Post (www.huffingtonpost.com) dummy (pre)"
replace read_huff=. if inrange(V201634c, -9, -1)
label values read_huff vallab1
codebook V201634c
codebook read_huff

codebook V201634d
gen read_nyt = V201634d
label variable read_nyt "R regularly reads New York Times (nytimes.com) dummy (pre)"
replace read_nyt=. if inrange(V201634d, -9, -1)
label values read_nyt vallab1
codebook V201634d
codebook read_nyt

codebook V201634e
gen read_breit = V201634e
label variable read_breit "R regularly reads Breitbart News Network (breitbart.com) dummy (pre)"
replace read_breit=. if inrange(V201634e, -9, -1)
label values read_breit vallab1
codebook V201634e
codebook read_breit

codebook V201634f
gen read_fox = V201634f
label variable read_fox "R regularly reads Fox News (www.foxnews.com) dummy (pre)"
replace read_fox=. if inrange(V201634f, -9, -1)
label values read_fox vallab1
codebook V201634f
codebook read_fox

codebook V201634g
gen read_wapo = V201634g
label variable read_wapo "R regularly reads Washignton Post (washingtonpost.com) dummy (pre)"
replace read_wapo=. if inrange(V201634g, -9, -1)
label values read_wapo vallab1
codebook V201634g
codebook read_wapo

codebook V201634h
gen read_guardian = V201634h
label variable read_guardian "R regularly reads The Guardian (theguardian.com) dummy (pre)"
replace read_guardian=. if inrange(V201634h, -9, -1)
label values read_guardian vallab1
codebook V201634h
codebook read_guardian

codebook V201634i
gen read_usa_today = V201634i
label variable read_usa_today "R regularly reads USA Today (usatoday.com) dummy (pre)"
replace read_usa_today=. if inrange(V201634i, -9, -1)
label values read_usa_today vallab1
codebook V201634i
codebook read_usa_today

codebook V201634j
gen read_bbc = V201634j
label variable read_bbc "R regularly reads BBC News (www.bbc.co.uk) dummy (pre)"
replace read_bbc=. if inrange(V201634j, -9, -1)
label values read_bbc vallab1
codebook V201634j
codebook read_bbc

codebook V201634k
gen read_npr = V201634k
label variable read_npr "R regularly reads NPR News (npr.org) dummy (pre)"
replace read_npr=. if inrange(V201634k, -9, -1)
label values read_npr vallab1
codebook V201634k
codebook read_npr

codebook V201634m
gen read_daily_caller = V201634m
label variable read_daily_caller "R regularly reads Daily Caller (dailycaller.com) dummy (pre)"
replace read_daily_caller=. if inrange(V201634m, -9, -1)
label values read_daily_caller vallab1
codebook V201634m
codebook read_daily_caller

codebook V201634n
gen read_bloomberg = V201634n
label variable read_bloomberg "R regularly reads Bloomberg (bloomberg.com) dummy (pre)"
replace read_bloomberg=. if inrange(V201634n, -9, -1)
label values read_bloomberg vallab1
codebook V201634n
codebook read_bloomberg

codebook V201634p
gen read_buzzfeed = V201634p
label variable read_buzzfeed "R regularly reads Buzzfeed (buzzfeed.com) dummy (pre)"
replace read_buzzfeed=. if inrange(V201634q, -9, -1)
label values read_buzzfeed vallab1
codebook V201634p
codebook read_buzzfeed

codebook V201634q
gen read_nbc = V201634q
label variable read_nbc "R regularly reads NBC News (www.nbcnews.com) dummy (pre)"
replace read_nbc=. if inrange(V201634q, -9, -1)
label values read_nbc vallab1
codebook V201634q
codebook read_nbc

codebook V201634r
gen read_other = V201634r
label variable read_other "R regularly reads a website other than the ones listed previously dummy (pre)"
replace read_other=. if inrange(V201634r, -9, -1)
label values read_other vallab1
codebook V201634r
codebook read_other

codebook V201634s
gen read_none = V201634s
label variable read_none "R regularly reads none of the above websites listed dummy (pre)"
replace read_none=. if inrange(V201634s, -9, -1)
label values read_none vallab1
codebook V201634s
codebook read_none

codebook V201635a
gen read_nyt_paper = V201635a
label variable read_nyt_paper "R regularly reads The New York Times Newspaper dummy (pre)"
replace read_nyt_paper=. if inrange(V201635a, -9, -1)
label values read_nyt_paper vallab1
codebook V201635a
codebook read_nyt_paper

codebook V201635b
gen read_usatoday_paper = V201635b
label variable read_usatoday_paper "R regularly reads USA TOday Newspaper dummy (pre)"
replace read_usatoday_paper=. if inrange(V201635b, -9, -1)
label values read_usatoday_paper vallab1
codebook V201635b
codebook read_usatoday_paper

codebook V201635c
gen read_wsjournal = V201635c
label variable read_wsjournal "R regularly reads The Wall Street Journal Newspaper dummy (pre)"
replace read_wsjournal=. if inrange(V201635c, -9, -1)
label values read_wsjournal vallab1
codebook V201635c
codebook read_wsjournal

codebook V201635d
gen read_wapo_paper = V201635d
label variable read_wapo_paper "R regularly reads The Washington Post Newspaper dummy (pre)"
replace read_wapo_paper=. if inrange(V201635d, -9, -1)
label values read_wapo_paper vallab1
codebook V201635d
codebook read_wapo_paper

///V201635e-V201635j are all -3///

codebook V201635k
gen read_no_paper = V201635k
label variable read_no_paper "R reads no printed newspaper dummy (pre)"
replace read_no_paper=. if inrange(V201635k, -9, -1)
label values read_no_paper vallab1
codebook V201635k
codebook read_no_paper

codebook V201636a
gen read_nyt_webpaper = V201636a
label variable read_nyt_webpaper "R regularly reads www.nytimes.com (New York Times) Online Newspaper dummy (pre)"
replace read_nyt_webpaper=. if inrange(V201636a, -9, -1)
label values read_nyt_webpaper vallab1
codebook V201636a
codebook read_nyt_webpaper

codebook V201636b
gen read_usatoday_webpaper = V201636b
label variable read_usatoday_webpaper "R regularly reads www.usatoday.com (USA Today) online newspaper dummy (pre)"
replace read_usatoday_webpaper=. if inrange(V201636b, -9, -1)
label values read_usatoday_webpaper vallab1
codebook V201636b
codebook read_usatoday_webpaper

codebook V201636c
gen read_wsj_webpaper = V201636c
label variable read_wsj_webpaper "R regularly reads online.wsj.com (Wall Street Journal) online newspaper dummy (pre)"
replace read_wsj_webpaper=. if inrange(V201636c, -9, -1)
label values read_wsj_webpaper vallab1
codebook V201636c
codebook read_wsj_webpaper

codebook V201636d
gen read_wapo_webpaper = V201636d
label variable read_wapo_webpaper "R regularly reads www.wahsingtonpost.com (Wash Post) online newspaper dummy (pre)"
replace read_wapo_webpaper=. if inrange(V201636d, -9, -1)
label values read_wapo_webpaper vallab1
codebook V201636d
codebook read_wapo_webpaper

///V201636e-V201636j is all -3///

codebook V201636k
gen read_no_webpaper = V201636k
label variable read_no_webpaper "R regularly reads no online newspaper dummy (pre)"
replace read_no_webpaper=. if inrange(V201636k, -9, -1)
label values read_no_webpaper vallab1
codebook V201636k
codebook read_no_webpaper

///V201637x and V201638x are both all -2///
codebook V201639
gen innocent_sexism = V201639
label variable innocent_sexism "Innocent remarks interpreted by women as sexist (pre)"
replace innocent_sexism=. if V201639==-9 | V201639==-5
replace innocent_sexism=1 if V201639==5
replace innocent_sexism=2 if V201639==4
replace innocent_sexism=4 if V201639==2
replace innocent_sexism=5 if V201639==1
label define vallab105 1 "Disagree strongly" 2 "Disagree somewhat" 3 "Neither agree nor disagree" 4 "Agree somewhat" 5 "Agree strongly"
label values innocent_sexism vallab105
codebook V201639
codebook innocent_sexism

codebook V201640
gen control_men = V201640
label variable control_men "Women seek to gain power by getting control over men (pre)"
replace control_men=. if V201640==-9 | V201640==-5
replace control_men=1 if V201640==5
replace control_men=2 if V201640==4
replace control_men=4 if V201640==2
replace control_men=5 if V201640==1
label values control_men vallab105
codebook V201640
codebook control_men

codebook V201641
gen r_integrity = V201641
label variable r_integrity "Will R promise to try best without looking up any answers (Political Knowledge intro) dummy (pre)"
replace r_integrity=. if inrange(V201641, -9, -4) | V201641==3
///I decided to put the continue option under missing. Let me know if I should recode///
replace r_integrity=0 if V201641==2
label values r_integrity vallab1
codebook V201641
codebook r_integrity

codebook V201642
gen integrity_catch = V201642
label variable integrity_catch "Political knowledge integrity catch question answered correctly dummy (pre)"
replace integrity_catch=. if inrange(V201642, -9, -1)
replace integrity_catch=0 if inrange(V201642, 1000, 1895) | inrange(V201642, 1897, 2020)
replace integrity_catch=1 if V201642==1896
label values integrity_catch vallab1
codebook V201642
codebook integrity_catch

codebook V201643
gen looked_up = V201643
label variable looked_up "If answered catch question right, admitted that they looked it up dummy (pre)"
replace looked_up=. if V201643==-5 | V201643==-1
replace looked_up=0 if V201643==2
label values looked_up vallab1
codebook V201643
codebook looked_up

codebook V201644
gen senate_term_sum = V201644
label variable senate_term_sum "Summary of how many years R thinks is full term for US Senator (pre)"
replace senate_term_sum=. if V201644==-9 | V201644==-5
replace senate_term_sum=1 if inrange(V201644, 1, 5)
replace senate_term_sum=2 if V201644==6
replace senate_term_sum=3 if inrange(V201644, 7, 99)
label define vallab106 1 "Too short" 2 "Correct answer (6)" 3 "Too long"
label values senate_term_sum vallab199
codebook V201644
codebook senate_term_sum

gen senate_term_short = V201644
label variable senate_term_short "R was too short in answer of years in full term for US Senate (1-5) dummy (pre)"
replace senate_term_short=. if V201644==-9 | V201644==-5
replace senate_term_short=1 if inrange(V201644, 1, 5)
replace senate_term_short=0 if inrange(V201644, 6, 99)
label values senate_term_short vallab1
codebook V201644
codebook senate_term_short

gen senate_term_6 = V201644
label variable senate_term_6 "R correctly answered how many years in full term for US Senate (6) dummy (pre)"
replace senate_term_6=. if V201644==-9 | V201644==-5
replace senate_term_6=1 if V201644==6
replace senate_term_6=0 if inrange(V201644, 1, 5) | inrange(V201644, 7, 99)
label values senate_term_6 vallab1
codebook V201644
codebook senate_term_6

gen senate_term_long = V201644
label variable senate_term_long "R was too long in answer of how many years in full term for US Senator (7-99) dummy (pre)"
replace senate_term_long=. if V201644==-9 | V201644==-5
replace senate_term_long=1 if inrange(V201644, 7, 99)
replace senate_term_long=0 if inrange(V201644, 1, 6)
label values senate_term_long vallab1
codebook V201644
codebook senate_term_long

///For now, I'll only code the following questions as dummy for right/wrong. If I should code dummies for all 4 options, let me know///

codebook V201645
gen spend_least = V201645
label variable spend_least "R correctly answered which program the Federal government spends the least on (foreign aid) dummy (pre)"
replace spend_least=. if V201645==-9 | V201645==-5
replace spend_least=0 if inrange(V201645, 2, 4)
label values spend_least vallab1
codebook V201645
codebook spend_least

codebook V201646
gen house_majority = V201646
label variable house_majority "R correctly answered the party with most members in House before election (Democrats) dummy (pre)"
replace house_majority=. if V201646==-9 | V201646==-5
replace house_majority=0 if V201646==2
label values house_majority vallab1
codebook V201646
codebook house_majority

codebook V201647
gen senate_majority = V201647
label variable senate_majority "R correctly answered the party with most members in Senate before election (Repblicans) dummy (pre)"
replace senate_majority=. if V201647==-9 | V201647==-5
replace senate_majority=0 if V201647==1
replace senate_majority=1 if V201647==2
label values senate_majority vallab1
codebook V201647
codebook senate_majority

codebook V201648
gen access_ease = V201648
label variable access_ease "Ease of online access (pre)"
replace access_ease=. if V201648==-9 | V201648==-5 | V201648==-1
replace access_ease=0 if V201648==1
replace access_ease=1 if V201648==2
replace access_ease=2 if V201648==3
replace access_ease=3 if V201648==4
replace access_ease=4 if V201648==5
label define vallab107 0 "Not at all easy" 1 "A little easy" 2 "Moderately easy" 3 "Very easy" 4 "Extremely easy"
label values access_ease vallab107
codebook V201648
codebook access_ease

codebook V201649
gen interview_rating = V201649
label variable interview_rating "R rating of interview (pre)"
replace interview_rating=. if V201649==-9 | V201649==-5
replace interview_rating=1 if V201649==7
replace interview_rating=2 if V201649==6
replace interview_rating=3 if V201649==5
replace interview_rating=5 if V201649==3
replace interview_rating=6 if V201649==2
replace interview_rating=7 if V201649==1
label define vallab108 1 "Disliked a great deal" 2 "Disliked a moderate amount" 3 "Disliked a little" 4 "Neither liked nor disliked" 5 "Liked a little" 6 "Liked a moderate amount" 7 "Liked a great deal"
label values interview_rating vallab108
codebook V201649
codebook interview_rating

codebook V201650
gen took_seriously = V201650
label variable took_seriously "How often took survey seriously (pre)"
replace took_seriously=. if V201650==-9 | V201650==-5
replace took_seriously=0 if V201650==1
replace took_seriously=1 if V201650==2
replace took_seriously=2 if V201650==3
replace took_seriously=3 if V201650==4
replace took_seriously=4 if V201650==5
label define vallab109 0 "Never serious" 1 "Some of the time serious" 2 "About half the time serious" 3 "Most of the time serious" 4 "Always serious"
label values took_seriously vallab109
codebook V201650
codebook took_seriously

codebook V201651
gen life_satisfy = V201651
label variable life_satisfy "How satisfied is R with life (pre)"
replace life_satisfy=. if inrange(V201651, -9, -5)
replace life_satisfy=0 if V201651==5
replace life_satisfy=1 if V201651==4
replace life_satisfy=2 if V201651==3
replace life_satisfy=3 if V201651==2
replace life_satisfy=4 if V201651==1
label define vallab110 0 "Not satified at all" 1 "Slightly satisfied" 2 "Moderately satisfied" 3 "Very satisfied" 4 "Extremely satisfied"
label values life_satisfy vallab110
codebook V201651
codebook life_satisfy

codebook V201652
///All -2///


///Post Section///

codebook V202001
gen spk_engp = V202001
label variable spk_engp "Do You Speak/Prefer English dummy (post)"
replace spk_engp=. if V202001==-7 | V202001==-6
replace spk_engp=0 if V202001==2
label values spk_engp vallab1
codebook V202001
codebook spk_engp

gen spk_spnp = V202001
label variable spk_spnp "Do You Speak/Prefer Spanish dummy (post)"
replace spk_spnp=. if V202001==-7 | V202001==-6
replace spk_spnp=0 if V202001==1
replace spk_spnp=1 if V202001==2
label values spk_spnp vallab1
codebook V202001
codebook spk_spnp

///As with the pre, I'm not sure how to code V202002a and V202002b///

codebook V202003
///All -2///

codebook V202004
gen party_contactp = V202004
label variable party_contactp "Did party contact R about campaign dummy (post)"
replace party_contactp=. if V202004==-8 | V202004==-7 | V202004==-6 | V202004==-1
replace party_contactp=0 if V202004==2
label values party_contactp vallab1
codebook V202004
codebook party_contactp

codebook V202005
gen party_contact2p = V202005
label variable party_contact2p "DId party contact R about 2020 campaign dummy (post)"
replace party_contact2p=. if inrange(V202005, -9, -1)
replace party_contact2p=0 if V202005==2
label values party_contact2p vallab1
codebook V202005
codebook party_contact2p

codebook V202006
gen dem_contactp = V202006
label variable dem_contactp "If contacted, R was contacted by Democrats about campaign dummy (post)"
replace dem_contactp=. if inrange(V202006, -9, -1)
replace dem_contactp=0 if V202006==2 | V202006==5
replace dem_contactp=1 if V202006==3
///I included "both" under 1///
label values dem_contactp vallab1
codebook V202006
codebook dem_contactp

gen rep_contactp = V202006
label variable rep_contactp "If contacted, R was contacted by Republican about campaign dummy (post)"
replace rep_contactp=. if inrange(V202006, -9, -1)
replace rep_contactp=0 if V202006==1 | V202006==5
replace rep_contactp=1 if V202006==2 | V202006==3
label values rep_contactp vallab1
codebook V202006
codebook rep_contactp

gen both_contactp = V202006
label variable both_contactp "If contacted, R was contacted by both Democrats and Republicans dummy (post)"
replace both_contactp=. if inrange(V202006, -9, -1)
replace both_contactp=0 if V202006==1 | V202006==2 | V202006==5
replace both_contactp=1 if V202006==3
label values both_contactp vallab1
codebook V202006
codebook both_contactp

codebook V202007
gen other_contactp = V202007
label variable other_contactp "Someone not from two major parties contact R about supporting candidates dummy (post)"
replace other_contactp=. if inrange(V202007, -9, -6)
replace other_contactp=0 if V202007==2
label values other_contactp vallab1
codebook V202007
codebook other_contactp

codebook V202008
gen reg_gotv_talkp = V202008
label variable reg_gotv_talkp "Anyone talk to R about registering or getting out the vote dummy (post)"
replace reg_gotv_talkp=. if inrange(V202008, -8, -6)
replace reg_gotv_talkp=0 if V202008==2
label values reg_gotv_talkp vallab1
codebook V202008
codebook reg_gotv_talkp

codebook V202009
gen voting_talkp = V202009
label variable voting_talkp "R talk to anyone about voting for or against a party or candidate dummy (post)"
replace voting_talkp=. if inrange(V202009, -9, -6)
replace voting_talkp=0 if V202009==2
label values voting_talkp vallab1
codebook V202009
codebook voting_talkp

codebook V202010
///Unsure if coding this one is necessary///
codebook V202011
codebook V202012
///Unsure how to code these or if I even should///

codebook V202013
gen attend_pol_onlinep = V202013
label variable attend_pol_onlinep "R attend online political meetings, rallies, speeches, fundraisers dummy (post)"
replace attend_pol_onlinep=. if V202013==-7 | V202013==-6
replace attend_pol_onlinep=0 if V202013==2
label values attend_pol_onlinep vallab1
codebook V202013
codebook attend_pol_onlinep

codebook V202014
gen attend_pol_physp = V202014
label variable attend_pol_physp "R go to any political meetings, rallies, speeches, dinner dummy (post)"
replace attend_pol_physp=. if inrange(V202014, -9, -6)
replace attend_pol_physp=0 if V202014==2
label values attend_pol_physp vallab1
codebook V202014
codebook attend_pol_physp

codebook V202015
gen camp_merchp = V202015
label variable camp_merchp "R wear campaign button or post sign or bumper sticker dummy (post)"
replace camp_merchp=. if inrange(V202015, -9, -6)
replace camp_merchp=0 if V202015==2
label values camp_merchp vallab1
codebook V202015
codebook camp_merchp

codebook V202016
gen camp_workp = V202016
label variable camp_workp "R do any (other) work for party or candidate dummy (post)"
replace camp_workp=. if V202016==-7 | V202016==-6
replace camp_workp=0 if V202016==2
label values camp_workp vallab1
codebook V202016
codebook camp_workp

codebook V202017
gen camp_donatep = V202017
label variable camp_donatep "R contribute money to individual candidate running for public office dummy (post)"
replace camp_donatep=. if V202017==-7 | V202017==-6
replace camp_donatep=0 if V202017==2
label values camp_donatep vallab1
codebook V202017
codebook camp_donatep

codebook V202018
///All -3///

codebook V202019
gen party_donatep = V202019
label variable party_donatep "R contribute money to political party during this election year dummy (post)"
replace party_donatep=. if inrange(V202019, -9, -1)
replace party_donatep=0 if V202019==2
label values party_donatep vallab1
codebook V202019
codebook party_donatep

codebook V202020
///All -3///

codebook V202021
gen group_donatep = V202021
label variable group_donatep "R contribute to any other group that supported or opposed candidates dummy (post)"
replace group_donatep=. if inrange(V202021, -9, -6)
replace group_donatep=0 if V202021==2
label values group_donatep vallab1
codebook V202021
codebook group_donatep

codebook V202022
gen discuss_polp = V202022
label variable discuss_polp "R ever discuss politics with family or friends dummy (post)"
replace discuss_polp=. if inrange(V202022, -9, -6)
replace discuss_polp=0 if V202022==2
label values discuss_polp vallab1
codebook V202022
codebook discuss_polp

codebook V202023
gen days_polp = V202023
label variable days_polp "How many days in past week discussed politics with family or friends (post)"
replace days_polp=. if inrange(V202023, -9, -1)
codebook V202023
codebook days_polp

codebook V202024
gen pol_argp = V202024
label variable pol_argp "Has R in past 12 months: gotten into political argument dummy (post)"
replace pol_argp=. if inrange(V202024, -9, -6)
replace pol_argp=0 if V202024==2
label values pol_argp vallab1
codebook V202024
codebook pol_argp

codebook V202025
gen join_mvmtp = V202025
label variable join_mvmtp "Has R in past 12 months: joined a protest march, rally or demonstration dummy (post)"
replace join_mvmtp=. if inrange(V202025, -9, -6)
replace join_mvmtp=0 if V202025==2
label values join_mvmtp vallab1
codebook V202025
codebook join_mvmtp

codebook V202026
gen sign_petp = V202026
label variable sign_petp "Has R in past 12 months: sign internet or paper petition dummy (post)"
replace sign_petp=. if inrange(V202026, -9, -6)
replace sign_petp=0 if V202026==2
label values sign_petp vallab1
codebook V202026
codebook sign_petp

codebook V202027
gen rel_donatep = V202027
label variable rel_donatep "Has R in past 12 months: given money to religious organization dummy (post)"
replace rel_donatep=. if inrange(V202027, -9, -6)
replace rel_donatep=0 if V202027==2
label values rel_donatep vallab1
codebook V202027
codebook rel_donatep

codebook V202028
gen other_donatep = V202028
label variable other_donatep "Has R in past 12 months: given money to other organization dummy (post)"
replace other_donatep=. if inrange(V202028, -9, -6)
replace other_donatep=0 if V202028==2
label values other_donatep vallab1
codebook V202028
codebook other_donatep

codebook V202029
gen pol_commentp = V202029
label variable pol_commentp "Has R in past 12 months: posted comment online about political issue dummy (post)"
replace pol_commentp=. if inrange(V202029, -9, -6)
replace pol_commentp=0 if V202029==2
label values pol_commentp vallab1
codebook V202029
codebook pol_commentp

codebook V202030
gen contact_congressp = V202030
label variable contact_congressp "Has R in past 12 months: contacted member of US Senate or House of Rep dummy (post)"
replace contact_congressp=. if inrange(V202030, -9, -6)
replace contact_congressp=0 if V202030==2
label values contact_congressp vallab1
codebook V202030
codebook contact_congressp

codebook V202031
gen service_workp = V202031
label variable service_workp "Has R in past 12 months: worked w/others to deal w/issue facing community dummy (post)"
replace service_workp=. if inrange(V202031, -9, -6)
replace service_workp=0 if V202031==2
label values service_workp vallab1
codebook V202031
codebook service_workp

codebook V202032
gen attend_mtgp = V202032
label variable attend_mtgp "Has R in past 12 months: attend mtg about issue facing community/schools dummy (post)"
replace attend_mtgp=. if inrange(V202032, -9, -6)
replace attend_mtgp=0 if V202032==2
label values attend_mtgp vallab1
codebook V202032
codebook attend_mtgp

codebook V202033
gen vol_workp = V202033
label variable vol_workp "Has R in past 12 months: done any volunteer work dummy (post)"
replace vol_workp=. if V202033==-7 | V202033==-6
replace vol_workp=0 if V202033==2
label values vol_workp vallab1
codebook V202033
codebook vol_workp

codebook V202034
gen contact_efofficialp = V202034
label variable contact_efofficialp "Has R in past 12 months: contacted federal elected official dummy (pre)"
replace contact_efofficialp=. if inrange(V202034, -8, -6)
replace contact_efofficialp=0 if V202034==2
label values contact_efofficialp vallab1
codebook V202034
codebook contact_efofficialp

codebook V202035
///All -2///

codebook V202036
gen contact_nefofficialp = V202036
label variable contact_nefofficialp "Has R in past 12 months: contacted non-elected official in federal govt dummy (post)"
replace contact_nefofficialp=. if inrange(V202036, -9, -6)
replace contact_nefofficialp=0 if V202036==2
label values contact_nefofficial vallab1
codebook V202036
codebook contact_nefofficial

codebook V202037
///All -2///

codebook V202038
gen contact_eslofficialp = V202038
label variable contact_eslofficialp "Has R in past 12 months: contacted elected officail on state/local level dummy (post)"
replace contact_eslofficialp=. if inrange(V202038, -9, -6)
replace contact_eslofficialp=0 if V202038==2
label values contact_eslofficialp vallab1
codebook V202038
codebook contact_eslofficialp

codebook V202039
///All -2///

codebook V202040
gen contact_neslofficialp = V202040
label variable contact_neslofficialp "Has R in past 12 months contacted non-elected official in state/local gov dummy (post)"
replace contact_neslofficialp=. if inrange(V202040, -9, -6)
replace contact_neslofficialp=0 if V202040==2
label values contact_neslofficialp vallab1
codebook V202040
codebook contact_neslofficialp

codebook V202041
///All -2///

codebook V202042
gen spend_polp = V202042
label variable spend_polp "How often bought or boycotted product/service for social/political reasons (post)"
replace spend_polp=. if inrange(V202042, -9, -6)
replace spend_polp=0 if V202042==1
replace spend_polp=1 if V202042==2
replace spend_polp=2 if V202042==3
replace spend_polp=3 if V202042==4
replace spend_polp=4 if V202042==5
label values spend_polp vallab2
codebook V202042
codebook spend_polp

///V202043-V202045 unsure how to code///

///All parts of V202050 -2///
codebook V202051
///Thought I should make this a dummy///
gen reg_votep = V202051
label variable reg_votep "R registered to vote dummy (post)"
replace reg_votep=. if inrange(V202051, -9, -1)
replace reg_votep=0 if V202051==3
replace reg_votep=1 if V202051==2
label values reg_votep vallab1
codebook V202051
codebook reg_votep

///All data is missing for V202052///
///V202053-V202055 All -2///
codebook V202056
gen when_registeredp = V202056
label variable when_registeredp "When R registered to vote (post)"
replace when_registeredp=. if inrange(V202056, -9, -1)
label define vallab113 1 "In the past 12 months" 2 "1-2 years ago" 3 "3-4 years ago" 4 "5 or more years ago"
label values when_registeredp vallab113
codebook V202056
codebook when_registeredp

///V202057x All -2///
///V202058 All -3///
///V202059 All -2///
///Unsure if V202060 requires coding///
///V202060z All -3///

codebook V202061
gen time_registeredp = V202061
label variable time_registeredp "How long has R been registered at location (post)"
replace time_registered=. if inrange(V202061, -9, -1)
label values time_registeredp vallab4
codebook V202061
codebook time_registeredp

///V202062 All -3///
///V202063x all -2///
codebook V202064
gen party_regp = V202064
label variable party_regp "Party of registration (post)"
replace party_regp=. if inrange(V202064, -9, -1)
replace party_regp=3 if V202064==4 | V202064==5
label values party_regp vallab5
codebook V202064
codebook party_regp

gen reg_demp = V202064
label variable reg_demp "Registered Democrat dummy (post)"
replace reg_demp=0 if V202064==2 | V202064==4 | V202064==5
replace reg_demp=. if inrange(V202064, -9, -1)
label values reg_demp vallab1
codebook V202064
codebook reg_demp

gen reg_repp = V202064
label variable reg_repp "Registered Republican dummy (post)"
replace reg_repp=1 if V202064==2
replace reg_repp=0 if V202064==1 | V202064==4 | V202064==5
replace reg_repp=. if inrange(V202064, -9, -1)
label values reg_repp vallab1
codebook V202064
codebook reg_repp

///V202064z all -3///

///V202065x all -2///
codebook V202066
gen votep = V202066
///I decided to make this a dummy. If you'd prefer a likert scale, let me know///
label variable votep "Did R vote in November 2020 election dummy (post)"
replace votep=. if inrange(V202066, -9, -1)
replace votep=0 if inrange(V202066, 1, 3)
replace votep=1 if V202066==4
label values votep vallab1
codebook V202066
codebook votep
///There is no V202067///

///V202068-V202071 all -2///
codebook V202072
gen voted_presp = V202072
label variable voted_presp "Did R vote for President dummy (post)"
replace voted_presp=. if inrange(V202072, -9, -1)
replace voted_presp=0 if V202072==2
label values voted_presp vallab1
codebook V202072
codebook voted_presp

codebook V202073
gen votechoice_presp = V202073
label variable votechoice_presp "For whom did R vote for President (post)"
replace votechoice_pres=. if inrange(V202073, -9, -1)
label values votechoice_presp vallab8
codebook V202073
codebook votechoice_presp

///I chose to only code dummies for D and R this time///
gen voted_bidenp = V202073
label variable voted_bidenp "R voted for Joe Biden for President dummy (post)"
replace voted_bidenp=. if inrange(V202073, -9, -1)
replace voted_bidenp=0 if inrange(V202073, 2, 5)
label values voted_bidenp vallab1
codebook V202073
codebook voted_bidenp

gen voted_trumpp = V201029
label variable voted_trumpp "R voted for Donald Trump for President dummy (post)"
replace voted_trumpp=. if inrange(V202073, -9, -1)
replace voted_trumpp=0 if V202073==1 | inrange(V202073, 3, 5)
replace voted_trumpp=1 if V202073==2
label values voted_trumpp vallab1
codebook V202073
codebook voted_trumpp

///V202073z all -2///
codebook V202074
gen pref_strengthp = V202074
label variable pref_strengthp "Preference strong for Presidential candidate for whom R voted dummy (post)"
replace pref_strengthp=. if inrange(V202074, -9, -1)
replace pref_strengthp=0 if V202074==2
label values pref_strengthp vallab1
codebook V202074
codebook pref_strengthp

///V202075 all -2///
codebook V202076
gen pres_prefp = V202076
label variable pres_prefp "Does R prefer Presidential Candidate (did not vote) (post)"
replace pres_prefp=. if inrange(V202076, -7, -1)
replace pres_prefp=0 if V202076==2
label values pres_prefp vallab1
codebook V202076
codebook pres_prefp

codebook V202077
gen cand_prefp = V202077
label variable cand_prefp "Preference for Presidential Candidate (did not vote) (post)"
replace cand_prefp=. if inrange(V202077, -9, -1)
label values cand_prefp vallab8
codebook V202077
codebook cand_prefp

gen prefer_bidenp = V202077
label variable prefer_bidenp "R prefers Joe Biden for President dummy (post)"
replace prefer_bidenp=. if inrange(V202077, -9, -1)
replace prefer_bidenp=0 if inrange(V202077, 2, 5)
label values prefer_bidenp vallab1
codebook V202077
codebook prefer_bidenp

gen prefer_trumpp = V202077
label variable prefer_trumpp "R prefers Donald Trump for President dummy (post)"
replace prefer_trumpp=. if inrange(V202077, -9, -1)
replace prefer_trumpp=0 if V202077==1 | inrange(V202077, 3, 5)
replace prefer_trumpp=1 if V202077==2
label values prefer_trumpp vallab1
codebook V202077
codebook prefer_trumpp

///V202077z all -2///
codebook V202078
gen strong_prefp = V202078
label variable strong_prefp "Preference strong for prefered Presidential Candidate dummy (post)"
replace strong_prefp=. if inrange(V202078, -9, -1)
replace strong_prefp=0 if V202078==2
label values strong_prefp vallab1
codebook V202078
codebook strong_prefp

///V202079x all -2///
codebook V202080
gen house_votep = V202080
label variable house_votep "Did R vote for US House of Representatives dummy (post)"
replace house_votep=. if inrange(V202080, -9, -1)
replace house_votep=0 if V202080==2
label values house_votep vallab1
codebook V202080
codebook house_votep

codebook V202081
gen cand_housep = V202081
label variable cand_housep "For whom did R vote for US House (post)"
replace cand_housep=. if inrange(V202081, -9, -1)
replace cand_housep=3 if V202081==5
label values cand_housep vallab9
codebook V202081
codebook cand_housep

gen voted_demhousep = V202081
label variable voted_demhousep "R voted for the Democratic House Candidate dummy (post)"
replace voted_demhousep=. if inrange(V202081, -9, -1)
replace voted_demhousep=0 if inrange(V202081, 2, 5)
label values voted_demhousep vallab1
codebook V202081
codebook voted_demhousep

gen voted_rephousep = V202081
label variable voted_rephousep "R voted for Republican House Candidate dummy (post)"
replace voted_rephousep=. if inrange(V202081, -9, -1)
replace voted_rephousep=0 if V202081==1 | V202081==3 | V202081==5
replace voted_rephousep=1 if V202081==2
label values voted_rephousep vallab1
codebook V202081
codebook voted_rephousep

///V202082 all -2///
codebook V202083
gen house_prefp = V202083
label variable house_prefp "Does R prefer US House Candidate dummy (post)"
replace house_prefp=. if inrange(V202083, -9, -1)
replace house_prefp=0 if V202083==2
label values house_prefp vallab1
codebook V201044
codebook house_prefp

codebook V202084
gen house_party_prefp = V202084
label variable house_party_prefp "Whom does R prefer for US House (post)"
replace house_party_prefp=. if inrange(V202084, -9, -1)
replace house_party_prefp=3 if V201045==5
label values house_party_prefp vallab9
codebook V202084
codebook house_party_prefp

gen prefer_demhousep = V202084
label variable prefer_demhousep "R prefers Democratic House candidate dummy (post)"
replace prefer_demhousep=. if inrange(V202084, -9, -1)
replace prefer_demhousep=0 if inrange(V202084, 2, 5)
label values prefer_demhousep vallab1
codebook V202084
codebook prefer_demhousep

gen prefer_rephousep = V202084
label variable prefer_rephousep "R prefers Republican House candidate dummy (post)"
replace prefer_rephousep=. if inrange(V202084, -9, -1)
replace prefer_rephousep=0 if V202084==1 | V202084==3 | V202084==5
replace prefer_rephousep=1 if V202084==2
label values prefer_rephousep vallab1
codebook V202084
codebook prefer_rephousep

///V202084z-V202086x all -2///
codebook V202087
gen vote_senp = V202087
label variable vote_senp "Did R vote for US Senate dummy (post)"
replace vote_senp=. if inrange(V202087, -9, -1)
replace vote_senp=0 if V202087==2
label values vote_senp vallab1
codebook V202087
codebook vote_senp

codebook V202088
gen votechoice_senp = V202088
label variable votechoice_senp "R's vote for US Senate candidate (post)"
replace votechoice_senp=. if inrange(V202088, -9, -1)
replace votechoice_senp=3 if V202088==5
label values votechoice_senp vallab10
codebook V202088
codebook votechoice_senp

gen voted_demsenp = V202088
label variable voted_demsenp "R voted for Democratic Senate candidate dummy (post)"
replace voted_demsenp=. if inrange(V202088, -9, -1)
replace voted_demsenp=0 if inrange(V202088, 2, 5)
label values voted_demsenp vallab1
codebook V202088
codebook voted_demsenp

gen voted_repsenp = V202088
label variable voted_repsenp "R voted for Republican Senate candidate dummy (post)"
replace voted_repsenp=. if inrange(V202088, -9, -1)
replace voted_repsenp=0 if V202088==1 | V202088==3 | V202088==5
replace voted_repsenp=1 if V202088==2
label values voted_repsenp
codebook V202088
codebook voted_repsenp

///V202088z and V202089 all -2///
codebook V202090
gen sen_prefp = V202090
label variable sen_prefp "Does R prefer US Senate candidate dummy (post)"
replace sen_prefp=. if inrange(V202090, -9, -1)
replace sen_prefp=0 if V202090==2
label values sen_prefp vallab1
codebook V202090
codebook sen_prefp

codebook V202091
gen sen_party_prefp = V202091
label variable sen_party_prefp "What US Senate candidate does R prefer (post)"
replace sen_party_prefp=. if inrange(V202091, -9, -1)
replace sen_party_prefp=3 if V202091==5
label values sen_party_prefp vallab10
codebook V202091
codebook sen_party_prefp

gen prefer_demsenp = V202091
label variable prefer_demsenp "R prefers Democratic Senate candidate dummy (post)"
replace prefer_demsenp=. if inrange(V202091, -9, -1)
replace prefer_demsenp=0 if inrange(V202091, 2, 5)
label values prefer_demsenp vallab1
codebook V202091
codebook prefer_demsenp

gen prefer_repsenp = V202091
label variable prefer_repsenp "R prefers Republican Senate candidate dummy (post)"
replace prefer_repsenp=. if inrange(V202091, -9, -1)
replace prefer_repsenp=0 if V202091==1 | V202091==3 | V202091==5
replace prefer_repsenp=1 if V202091==2
label values prefer_repsenp vallab1
codebook V202091
codebook prefer_repsenp

///V202091z and V202092 all -2///
codebook V202093
gen voted_sen_spclp = V202093
label variable voted_sen_spclp "Did R vote for US Senate (special election) dummy (post)"
replace voted_sen_spclp=. if inrange(V202093, -9, -1)
replace voted_sen_spclp=0 if V202093==2
label values voted_sen_spclp vallab1
codebook V202093
codebook voted_sen_spclp

codebook V202094
gen votechoice_sen_spclp = V202094
label variable votechoice_sen_spclp "R's vote for US Senate (special election) (post)"
replace votechoice_sen_spclp=. if inrange(V202094, -9, -1)
replace votechoice_sen_spclp=3 if V202094==5
label values votechoice_sen_spclp vallab10
codebook V202094
codebook votechoice_sen_spclp

gen voted_demsen_spclp = V202094
label variable voted_demsen_spclp "R voted for Democratic Senate candidate dummy (post)"
replace voted_demsen_spclp=. if inrange(V202094, -9, -1)
replace voted_demsen_spclp=0 if inrange(V202094, 2, 5)
label values voted_demsen_spclp vallab1
codebook V202094
codebook voted_demsen_spclp

gen voted_repsen_spclp = V202094
label variable voted_repsen_spclp "R voted for Repbulican Senate candidate dummy (post)"
replace voted_repsen_spclp=. if inrange(V202094, -9, -1)
replace voted_repsen_spclp=0 if V202094==1 | V202094==3 | V202094==5
replace voted_repsen_spclp=1 if V202094==2
label values voted_repsen_spclp vallab1
codebook V202094
codebook voted_repsen_spclp

///V202094z and V202095 all -2///
codebook V202096
gen sen_spcl_prefp = V202096
label variable sen_spcl_prefp "Does R prefer US Senate candidate (special election) dummy (post)"
replace sen_spcl_prefp=. if inrange(V202096, -7, -1)
replace sen_spcl_prefp=0 if V202096==2
label values sen_spcl_prefp vallab1
codebook V202096
codebook sen_spcl_prefp

codebook V202097
gen sen_spcl_party_prefp = V202097
label variable sen_spcl_party_prefp "Whom does R prefer US Senate candidate (special election) (post)"
replace sen_spcl_party_prefp=. if inrange(V202097, -7, -1)
replace sen_spcl_party_prefp=3 if V202097==5
label values sen_spcl_party_prefp vallab10
codebook V202097
codebook sen_spcl_party_prefp

gen prefer_demsen_spclp = V202097
label variable prefer_demsen_spclp "R prefers Democratic Senate candidate dummy (post)"
replace prefer_demsen_spclp=. if inrange(V202097, -7, -1)
replace prefer_demsen_spclp=0 if inrange(V202097, 2, 5)
label values prefer_demsen_spclp vallab1
codebook V202097
codebook prefer_demsen_spclp

gen prefer_repsen_spclp = V202097
label variable prefer_repsen_spclp "R prefers Republican Senate candidate dummy (post)"
replace prefer_repsen_spclp=. if inrange(V202097, -7, -1)
replace prefer_repsen_spclp=0 if V202097==1 | V202097==3 | V202097==5
replace prefer_repsen_spclp=1 if V202097==2
label values prefer_repsen_spclp vallab1
codebook V202097
codebook prefer_repsen_spclp

///V202097z and V202098 all -2///
codebook V202099
gen gov_votep = V202099
label variable gov_votep "Did R vote for governor dummy (post)"
replace gov_votep=. if inrange(V202099, -7, -1)
replace gov_votep=0 if V202099==2
label values gov_votep vallab1
codebook V202099
codebook gov_votep

codebook V202100
gen gov_partyp = V202100
label variable gov_partyp "R's vote for governor (post)"
replace gov_partyp=. if inrange(V202100, -9, -1)
replace gov_partyp=3 if V202100==5
label values gov_partyp vallab11
codebook V202100
codebook gov_partyp

gen voted_demgovp = V202100
label variable voted_demgovp "R voted for Democratic Governor candidate dummy (post)"
replace voted_demgovp=. if inrange(V202100, -9, -1)
replace voted_demgovp=0 if V202100==2 | V202100==5
label values voted_demgovp vallab1
codebook V202100
codebook voted_demgovp

gen voted_repgovp = V202100
label variable voted_repgovp "R voted for Republican Governor candidate dummy (post)"
replace voted_repgovp=. if inrange(V202100, -9, -1)
replace voted_repgovp=0 if V202100==1 | V202100==5
replace voted_repgovp=1 if V202100==2
label values voted_repgovp vallab1
codebook V202100
codebook voted_repgovp

///V202100z and V202101 all -2///
codebook V202102
gen gov_prefp = V202102
label variable gov_prefp "Does R prefer gubernatorial candidate dummy (post)"
replace gov_prefp=. if inrange(V202102, -9, -1)
replace gov_prefp=0 if V202102==2
label values gov_prefp vallab1
codebook V202102
codebook gov_prefp

codebook V202103
gen gov_party_prefp = V202103
label variable gov_party_prefp "Whom does R prefer for governor (post)"
replace gov_party_prefp=. if inrange(V202103, -9, -1)
replace gov_party_prefp=3 if V202103==5
label values gov_party_prefp vallab11
codebook V202103
codebook gov_party_prefp

gen prefer_demgovp = V202103
label variable prefer_demgovp "R prefers Democratic Governor candidate dummy (post)"
replace prefer_demgovp=. if inrange(V202103, -9, -1)
replace prefer_demgovp=0 if V202103==2 | V202103==5
label values prefer_demgovp vallab1
codebook V202103
codebook prefer_demgovp

gen prefer_repgovp = V202103
label variable prefer_repgovp "R prefers Republican Governor candidate dummy (post)"
replace prefer_repgovp=. if inrange(V202103, -9, -1)
replace prefer_repgovp=0 if V202103==1 | V202103==5
replace prefer_repgovp=1 if V202103==2
label values prefer_repgovp vallab1
codebook V202103
codebook prefer_repgovp

///V202103z and V202104 all -2///
codebook V202105x
gen pres_vip_sump = V202105x
label variable pres_vip_sump "Summary: party of Presidential vote/preference (pre)"
replace pres_vip_sump=. if V202105x==-1 | V202105x==12 | V202105x==22 | V202105x==32
replace pres_vip_sump=1 if V202105x==10
replace pres_vip_sump=2 if V202105x==20
replace pres_vip_sump=3 if V202105x==30
replace pres_vip_sump=4 if V202105x==31
replace pres_vip_sump=5 if V202105x==21
replace pres_vip_sump=6 if V202105x==11
label values pres_vip_sump vallab111
codebook V202105x
codebook pres_vip_sump
///If I should recode this to eliminate intent in the scoring, please let me know///

codebook V202106x
gen house_vip_sump = V202106x
label variable house_vip_sump "Summary: party of U.S. House vote/preference (post)"
replace house_vip_sump=. if V202106x==-1 | V202106x==12 | V202106x==19 | V202106x==22 | V202106x==29 | V202106x==32 | V202106x==39
replace house_vip_sump=1 if V202106x==10
replace house_vip_sump=2 if V202106x==20
replace house_vip_sump=3 if V202106x==30
replace house_vip_sump=4 if V202106x==31
replace house_vip_sump=5 if V202106x==21
replace house_vip_sump=6 if V202106x==11
label values house_vip_sump vallab111
codebook V202106x
codebook house_vip_sump

codebook V202107x
gen senate_vip_sump = V202107x
label variable senate_vip_sump "Summary: party of U.S. Senate vote/preference (post)"
replace senate_vip_sump=. if V202107x==-1 | V202107x==12 | V202107x==19 | V202107x==22 | V202107x==29 | V202107x==32 | V202107x==39
replace senate_vip_sump=1 if V202107x==10
replace senate_vip_sump=2 if V202107x==20
replace senate_vip_sump=3 if V202107x==30
replace senate_vip_sump=4 if V202107x==31
replace senate_vip_sump=5 if V202107x==21
replace senate_vip_sump=6 if V202107x==11
label values senate_vip_sump vallab111
codebook V202107x
codebook senate_vip_sum

codebook V202108x
gen gov_vip_sump = V202108x
label variable gov_vip_sump "Summary: party of gubernatorial vote/preference (post)"
replace gov_vip_sump=. if V202108x==-1 | V202108x==12 | V202108x==22 | V202108x==29 | V202108x==39 | V202108x==19 | V202108x==32
replace gov_vip_sump=1 if V202108x==10
replace gov_vip_sump=2 if V202108x==20
replace gov_vip_sump=3 if V202108x==30
replace gov_vip_sump=4 if V202108x==31
replace gov_vip_sump=5 if V202108x==21
replace gov_vip_sump=6 if V202108x==11
label values gov_vip_sump vallab111
codebook V202108x
codebook gov_vip_sump

codebook V202109x
gen turnoutp = V202109x
label variable turnoutp "Summary: Voter turnout in 2020 dummy (voted=yes) (post)"
replace turnoutp=. if V202109x==-2
label values turnoutp vallab1
codebook V202109x
codebook turnoutp

codebook V202110x
gen pres_vote_sum = V202110x
label variable pres_vote_sum "Summary: 2020 Presidential vote (pre-post)"
replace pres_vote_sum=. if V202110x==-9 | V202110x==-1
label values pres_vote_sum vallab8
codebook V202110x
codebook pres_vote_sum

gen voted_biden_sump = V202110x
label variable voted_biden_sum "Summary: R voted for Joe Biden dummy (pre-post)"
replace voted_biden_sum=. if V202110x==-9 | V202110x==-1
replace voted_biden_sum=0 if inrange(V202110x, 2, 5)
label values voted_biden_sum vallab1
codebook V202110x
codebook voted_biden_sum

gen voted_trump_sum = V202110x
label variable voted_trump_sum "Summary: R voted for Donald Trump (in 2020) dummy (pre-post)"
replace voted_trump_sum=. if V202110x==-9 | V202110x==-1
replace voted_trump_sum=0 if V202110x==1 | inrange(V202110x, 3, 5)
replace voted_trump_sum=1 if V202110x==2
label values voted_trump_sum vallab1
codebook V202110x
codebook voted_trump_sum

codebook V202111x
gen voted_house_sum = V202111x
label variable voted_house_sum "Summary: party of 2020 U.S. House vote (pre-post)"
replace voted_house_sum=. if inrange(V202111x, -9, -1) | V202111x==19
///I decided to put the open ended responses under missing. Let me know if I should do otherwise///
label values voted_house_sum vallab9
codebook V202111x
codebook voted_house_sum

gen voted_demhouse_sum = V202111x
label variable voted_demhouse_sum "Summary: R voted for Democratic candidate in 2020 U.S. House vote dummy (pre-post)"
replace voted_demhouse_sum=. if inrange(V202111x, -9, -1) | V202111x==19
replace voted_demhouse_sum=0 if inrange(V202111x, 2, 3)
label values voted_demhouse_sum vallab1
codebook V202111x
codebook voted_demhouse_sum

gen voted_rephouse_sum = V202111x
label variable voted_rephouse_sum "Summary: R voted for Republican candidate in 2020 U.S. House vote dummy (pre-post)"
replace voted_rephouse_sum=. if inrange(V202111x, -9, -1) | V202111x==19
replace voted_rephouse_sum=0 if V202111x==1 | V202111x==3
replace voted_rephouse_sum=1 if V202111x==2
label values voted_rephouse_sum vallab1
codebook V202111x
codebook voted_rephouse_sum

codebook V202112x
gen voted_sen_sum = V202112x
label variable voted_sen_sum "Summary: party of 2020 U.S. Senate vote (pre-post)"
replace voted_sen_sum=. if inrange(V202112x, -9, -1) | V202112x==19
label values voted_sen_sum vallab10
codebook V202112x
codebook voted_sen_sum

gen voted_demsen_sum = V202112x
label variable voted_demsen_sum "Summary: R voted for Democratic candidate in 2020 U.S. Senate vote dummy (pre-post)"
replace voted_demsen_sum=. if inrange(V202112x, -9, -1) | V202112x==19
replace voted_demsen_sum=0 if V202112x==2 | V202112x==3
label values voted_demsen_sum vallab1
codebook V202112x
codebook voted_demsen_sum

gen voted_repsen_sum = V202112x
label variable voted_repsen_sum "Summary: R voted for Republican candidate in 2020 U.S. Senate vote dummy (pre-post)"
replace voted_repsen_sum=. if inrange(V202112x, -9, -1) | V202112x==19
replace voted_repsen_sum=0 if V202112x==1 | V202112x==3
replace voted_repsen_sum=1 if V202112x==2
label values voted_repsen_sum vallab1
codebook V202112x
codebook voted_repsen_sum

codebook V202113x
gen voted_gov_sum = V202113x
label variable voted_gov_sum "Summary: party of 2020 Governor vote (pre-post)"
replace voted_gov_sum=. if inrange(V202113x, -9, -1) | V202113x==19
label values voted_gov_sum vallab11
codebook V202113x
codebook voted_gov_sum

gen voted_demgov_sum = V202113x
label variable voted_demgov_sum "Summary: R voted for Democratic candidate in 2020 Governor vote dummy (pre-post)"
replace voted_demgov_sum=. if inrange(V202113x, -9, -1) | V202113x==19
replace voted_demgov_sum=0 if V202113x==2 | V202113x==3
label values voted_demgov_sum vallab1
codebook V202113x
codebook voted_demgov_sum

gen voted_repgov_sum = V202113x
label variable voted_repgov_sum "Summary: R voted for Republican candidate in 2020 Governor vote dummy (pre-post)"
replace voted_repgov_sum=. if inrange(V202113x, -9, -1) | V202113x==19
replace voted_repgov_sum=0 if V202113x==1 | V202113x==3
replace voted_repgov_sum=1 if V202113x==2
label values voted_repgov_sum vallab1
codebook V202113x
codebook voted_repgov_sum

codebook V202114a
gen missed_deadlinep = V202114a
label variable missed_deadlinep "R is not registered because R did not meet registration deadlines dummy (post)"
replace missed_deadlinep=. if inrange(V202114a, -7, -1)
label values missed_deadlinep vallab1
codebook V202114a
codebook missed_deadlinep

codebook V202114b
gen how_where_registerp = V202114b
label variable how_where_registerp "R is not registered because R did not know where or how to register dummy (post)"
replace how_where_registerp=. if inrange(V202114b, -7, -1)
label values how_where_registerp vallab1
codebook V202114b
codebook how_where_registerp

codebook V202114c
gen no_res_reqp = V202114c
label variable no_res_reqp "R is not registered because R did not meet residency requirements dummy (post)"
replace no_res_reqp=. if inrange(V202114c, -7, -1)
label values no_res_reqp vallab1
codebook V202114c
codebook no_res_reqp

codebook V202114d
gen incorrect_processp = V202114d
label variable incorrect_processp "R is not registered because R registration form was not processed correctly dummy (post)"
replace incorrect_processp=. if inrange(V202114d, -7, -1)
label values incorrect_processp vallab1
codebook V202114d
codebook incorrect_processp

codebook V202114e
gen no_idp = V202114e
label variable no_idp "R is not registered because R did not have required identification dummy (post)"
replace no_idp=. if inrange(V202114e, -7, -1)
label values no_idp vallab1
codebook V202114e
codebook no_idp

codebook V202114f
gen not_interestedp = V202114f
label variable not_interestedp "R is not interested because R was not interested in the election dummy (post)"
replace not_interestedp=. if inrange(V202114f, -7, -1)
label values not_interestedp vallab1
codebook V202114f
codebook not_interestedp

codebook V202114g
gen no_diffp = V202114g
label variable no_diffp "R is not registered because vote would not make a difference dummy (post)"
replace no_diffp=. if inrange(V202114g, -7, -1)
label values no_diffp vallab1
codebook V202114g
codebook no_diffp

codebook V202114h
gen ill_disabledp = V202114h
label variable ill_disabledp "R is not registered because of permanent illness or disability dummy (post)"
replace ill_disabledp=. if inrange(V202114h, -7, -1)
label values ill_disabledp vallab1
codebook V202114h
codebook ill_disabledp

codebook V202114i
gen eng_diffp = V202114i
label variable eng_diffp "R is not registered because difficulty with English dummy (post)"
replace eng_diffp=. if inrange(V202114i, -7, -1)
label values eng_diffp vallab1
codebook V202114i
codebook eng_diffp

codebook V202114j
gen not_eligiblep = V202114j
label variable not_eligiblep "R is not registered because R is not eligible to vote dummy (post)"
replace not_eligiblep=. if inrange(V202114j, -7, -1)
label values not_eligiblep vallab1
codebook V202114j
codebook not_eligiblep

codebook V202114k
gen no_reg_otherp = V202114k
label variable no_reg_otherp "R is not registed for other reason dummy (post)"
replace no_reg_otherp=. if inrange(V202114k, -7, -1)
label values no_reg_otherp vallab1
codebook V202114k
codebook no_reg_otherp

///V202114z all -2///

///V202115 all -2///

codebook V202116
gen voted_whenp = V202116
label variable voted_whenp "When R voted in 2020 election (post)"
replace voted_whenp=. if inrange(V202116, -9, -1)
label define vallab114 1 "On election day" 2 "A few days before election day" 3 "A week or more before election day"
label values voted_whenp vallab114
codebook V202116
codebook voted_whenp

codebook V202117
gen vote_mannerp = V202117
label variable vote_mannerp "In what manner did R vote (pre)"
replace vote_mannerp=. if inrange(V202117, -9, -1)
label define vallab115 1 "Polling Place" 2 "Mail" 3 "Don't know" 4 "Rather not answer"
label values vote_mannerp vallab115
codebook V202117
codebook vote_mannerp

gen vote_pollingp = V202117
label variable vote_pollingp "R voted in person at a polling placedummy (post)"
replace vote_pollingp=. if inrange(V202117, -9, -1)
replace vote_pollingp=0 if inrange(V202117, 2, 4)
label values vote_pollingp vallab1
codebook V202117
codebook vote_pollingp

gen vote_mailp = V202117
label variable vote_mailp "R Definitely voted by mailing a ballot to elections officials before election dummy (post)"
replace vote_mailp=. if inrange(V202117, -9, -1)
replace vote_mailp=0 if V202117==1 | V202117==3 | V202117==4
replace vote_mailp=1 if V202117==2
label values vote_mailp vallab1
codebook V202117
codebook vote_mailp

codebook V202118
gen usual_mannerp = V202118
label variable usual_mannerp "How does R usually vote (post)"
replace usual_mannerp=. if inrange(V202118, -9, -1)
label define vallab116 1 "Polling place" 2 "Mail or absentee ballot" 3 "This is my first time voting"
label values usual_mannerp vallab116
codebook V202118
codebook usual_mannerp

codebook V202119
gen how_diffp = V202119
label variable how_diffp "How difficult was it for R to vote (post)"
replace how_diffp=. if inrange(V202119, -9, -1)
replace how_diffp=0 if V202119==1
replace how_diffp=1 if V202119==2
replace how_diffp=2 if V202119==3
replace how_diffp=3 if V202119==4
replace how_diffp=4 if V202119==5
label define vallab117 0 "Not difficult at all" 1 "A little difficult" 2 "Moderately difficult" 3 "Very difficult" 4 "Extremely difficult"
label values how_diffp vallab117
codebook V202119
codebook how_diffp

codebook V202120a
gen reg_probp = V202120a
label variable reg_probp "R encountered registration progblesm while voting dummy (post)"
replace reg_probp=. if inrange(V202120a, -9, -1)
label values reg_probp vallab1
codebook V202120a
codebook reg_probp

codebook V202120b
gen id_concernp = V202120b
label variable id_concernp "R encountered concern about ID card while voting dummy (post)"
replace id_concernp=. if inrange(V202120b, -9, -1)
label values id_concernp vallab1
codebook V202120b
codebook id_concernp

codebook V202120c
gen abs_diffp = V202120c
label variable abs_diffp "R encountered difficulty obtaining absentee ballot while voting dummy (post)"
replace abs_diffp=. if inrange(V202120c, -9, -1)
label values abs_diffp vallab1
codebook V202120c
codebook abs_diffp

codebook V202120d
gen ballot_confp = V202120d
label variable ballot_confp "R encountered confusion about ballot or machine while voting dummy (post)"
replace ballot_confp=. if inrange(V202120d, -9, -1)
label values ballot_confp vallab1
codebook V202120d
codebook ballot_confp

codebook V202120e
gen getting_there_probp = V202120e
label variable getting_there_probp "R encountered difficulty getting to polling place when voting dummy (post)"
replace getting_there_probp=. if inrange(V202120e, -9, -1)
label values getting_there_probp vallab1
codebook V202120e
codebook getting_there_probp

codebook V202120f
gen long_waitp = V202120f
label variable long_waitp "R encountered long wait times when voting dummy (post)"
replace long_waitp=. if inrange(V202120f, -9, -1)
label values long_waitp vallab1
codebook V202120f
codebook long_waitp

codebook V202120g
gen work_conflictp = V202120g
label variable work_conflictp "R encountered work schedule problems when voting dummy (post)"
replace work_conflictp=. if inrange(V202120g, -9, -1)
label values work_conflictp vallab1
codebook V202120g
codebook work_conflictp

codebook V202120h
gen weather_probp = V202120h
label variable weather_probp "R encountered bad weather problems when voting dummy (post)"
replace weather_probp=. if inrange(V202120h, -9, -1)
label values weather_probp vallab1
codebook V202120h
codebook weather_probp

codebook V202120i
gen mailing_probp = V202120i
label variable mailing_probp "R encountered issue mailing ballot when voting dummy (post)"
replace mailing_probp=. if inrange(V202120i, -9, -1)
label values mailing_probp vallab1
codebook V202120i
codebook mailing_probp

codebook V202120j
gen other_voting_probp = V202120j
label variable other_voting_probp "R encountered other problem when voting dummy (post)"
replace other_voting_probp=. if inrange(V202120j, -9, -1)
label values other_voting_probp vallab1
codebook V202120j
codebook other_voting_probp

codebook V202120k
gen no_voting_probp = V202120k
label variable no_voting_probp "R encountered no problems at all when voting dummy (post)"
replace no_voting_probp=. if inrange(V202120k, -9, -1)
label values no_voting_probp vallab1
codebook V202120k
codebook no_voting_probp

///V202120z all -2///

codebook V202121
gen wait_timep = V202121
label variable wait_timep "How long was wait time at polling place (post)"
replace wait_timep=. if inrange(V202121, -7, -1)
label define vallab118 1 "0-15 minutes" 2 "16-30 minutes" 3 "31-59 minutes" 4 "1-2 hours" 5 "More than 2 hours"
label values wait_timep vallab118
codebook V202121
codebook wait_timep

codebook V202122
gen time_arrivingp = V202122
label variable time_arrivingp "How long does it take to get to polling place (post)"
replace time_arrivingp=. if inrange(V202122, -7, -1)
label values time_arrivingp vallab118
codebook V202122
codebook time_arrivingp

codebook V202123
tab V202123
gen reason_no_votep = V202123
label variable reason_no_votep "Main reason R did not vote (post)"
///I'll wait for now to make dummies for these///
replace reason_no_votep=. if inrange(V202123, -9, -1) | V202123==55
///I put don't know under missing///
label define vallab119 1 "I forgot" 2 "I'm not interested" 3 "Too busy" 4 "Did not like the candidates" 5 "I am not registered" 6 "I did not have the correct form of id" 7 "Out of town" 8 "Sick or disabled" 9 "Transportation" 10 "Bad weather" 11 "The line at the polls was too long" 12 "I was not allowed to vote at the polls, even though I tried" 13 "I requested but did not receive an absentee ballot" 14 "I did not know hwere to vote" 15 "I did not feel that I knew enough about the chocies" 16 "Other" 17 "There were no other reasons"
label values reason_no_votep vallab119
codebook V202123
codebook reason_no_vote

///V202123z all -2///
codebook V202124
tab V202124
gen alt_reason_no_votep = V202124
label variable alt_reason_no_votep "Any other reason R did not vote (post)"
replace alt_reason_no_votep=. if inrange(V202124, -9, -1) | V202124==55
label values alt_reason_no_votep vallab119
codebook V202124
codebook alt_reason_no_vote

///V202124z and V202125 all -2///
///There is no V202126-V202134///

codebook V202135
gen r_integrityp = V202135
label variable r_integrityp "Will R promise to try best without looking up any answers (Office Recall) dummy (post)"
replace r_integrityp=. if inrange(V202135, -9, -1)
replace r_integrityp=0 if V202135==2
label values r_integrityp vallab1
codebook V202135
codebook r_integrityp

///V202136 all -2///
codebook V202136y
gen integrity_catchp = V202136y
label variable integrity_catchp "Office recall integrity catch question answered correctly dummy (post)"
replace integrity_catchp=. if inrange(V202136y, -9, -1)
label values integrity_catchp vallab1
codebook V202136y
codebook integrity_catchp

codebook V202137
gen looked_upp = V202137
label variable looked_upp "If answered catch question right, admitted that they looked it up dummy (post)"
replace looked_upp=. if inrange(V202137, -7, -1)
replace looked_upp=0 if V202137==2
label values looked_upp vallab1
codebook V202137
codebook looked_upp

///V202138 all -2///
codebook V202138y
gen office_recall_q1p = V202138y
label variable office_recall_q1p "Office recall: Vice President - Mike Pence dummy (post)"
replace office_recall_q1p=. if inrange(V202138y, -7, -5)
label values office_recall_q1p vallab1
codebook V202138y
codebook office_recall_q1p

///V202139 all -2///
codebook V202139y1
gen office_recall_q2c1p = V202139y1
label variable office_recall_q2c1p "Office recall: Speaker of the House - Nancy Pelosi scheme one dummy (post)"
replace office_recall_q2c1p=. if inrange(V202139y1, -7, -5)
label values office_recall_q2c1p vallab1
codebook V202139y1
codebook office_recall_q2c1p

codebook V202139y2
gen office_recall_q2c2p = V202139y2
label variable office_recall_q2c2p "Office recall: Speaker of the House - Nancy Pelosi scheme two (post)"
replace office_recall_q2c2p=. if inrange(V202139y2, -7, -5)
label define vallab120 0 "Incorrect" 1 "Partially correct" 2 "Correct"
label values office_recall_q2c2p vallab120
codebook V202139y2
codebook office_recall_q2c2p

///V202140 all -2///
codebook V202140y1
gen office_recall_q3c1p = V202140y1
label variable office_recall_q3c1p "Office Recall: German Chancellor - Angela Merkel scheme one dummy (post)"
replace office_recall_q3c1p=. if inrange(V202140y1, -7, -5)
label values office_recall_q3c1p vallab1
codebook V202140y1
codebook office_recall_q3c1p

codebook V202140y2
gen office_recall_q3c2p = V202140y2
label variable office_recall_q3c2p "Office Recall: German Chancellor - Angela Merkel scheme two dummy (post)"
replace office_recall_q3c2p=. if inrange(V202140y2, -7, -5)
label values office_recall_q3c2p vallab1
codebook V202140y2
codebook office_recall_q3c2p

///V202141 all -2///
codebook V202141y1
gen office_recall_q4c1p = V202141y1
label variable office_recall_q4c1p "Office recall: Russian President - Vladimir Putin scheme 1 dummy (post)"
replace office_recall_q4c1p=. if inrange(V202141y1, -7, -5)
label values office_recall_q4c1p vallab1
codebook V202141y1
codebook office_recall_q4c1p

codebook V202141y2
gen office_recall_q4c2p = V202141y2
label variable office_recall_q4c2p "Office recall: Russian President - Vladimir Putin scheme 2 dummy (post)"
replace office_recall_q4c2p=. if inrange(V202141y2, -7, -5)
label values office_recall_q4c2p vallab1
codebook V202141y2
codebook office_recall_q4c2p

///V202142 all -2///
codebook V202142y1
gen office_recall_q5c1p = V202142y1
label variable office_recall_q5c1p "Office Recall: SCOTUS Chief Justice - John Roberts scheme one (post)"
replace office_recall_q5c1p=. if inrange(V202142y1, -7, -5)
label values office_recall_q5c1p vallab120
codebook V202142y1
codebook office_recall_q5c1p

codebook V202142y2
gen office_recall_q5c2p = V202142y2
label variable office_recall_q5c2p "Office Recall: SCOTUS Chief Justice - John Roberts scheme two dummy (post)"
replace office_recall_q5c2p=. if inrange(V202142y2, -7, -5)
label values office_recall_q5c2p vallab1
codebook V202142y2
codebook office_recall_q5c2p

codebook V202143
gen biden_fthermp = V202143
label variable biden_fthermp "Feeling Thermometer: Joe Biden, Democratic Presidential Candidate (post)"
replace biden_fthermp=. if inrange(V202143, -9, -1)
codebook V202143
codebook biden_fthermp

codebook V202144
gen trump_fthermp = V202144
label variable trump_fthermp "Feeling Thermometer: Donald Trump, Republican  Presidential Candidate (post)"
replace trump_fthermp=. if inrange(V202144, -9, -5)
codebook V202144
codebook trump_fthermp

codebook V202145
gen demhouse_fthermp = V202145
label variable demhouse_fthermp "Feeling thermometer: House Democratic Candidate (post)"
replace demhouse_fthermp=. if inrange(V202145, -9, -1) | V202145==998 | V202145==999
codebook V202145
codebook demhouse_fthermp

codebook V202146
gen rephouse_fthermp = V202146
label variable rephouse_fthermp "Feeling Thermometer: House Republican Candidate (post)"
replace rephouse_fthermp=. if inrange(V202146, -9, -1) | V202146==998 | V202146==999
codebook V202146
codebook rephouse_ftherm

codebook V202147
gen indhouse_fthermp = V202147
label variable indhouse_fthermp "Feeling Thermometer: House Ind/3rd-Party Candidate (post)"
replace indhouse_fthermp=. if inrange(V202147, -9, -1) | V202147==999
codebook V202147
codebook indhouse_fthermp

codebook V202148
gen demsen_fthermp = V202148
label variable demsen_fthermp "Feeling Thermometer: Senate Democratic Candidate (post)"
replace demsen_fthermp=. if inrange(V202148, -9, -1) | V202148==998 | V202148==999
codebook V202148
codebook demsen_ftherm

codebook V202149
gen repsen_fthermp = V202149
label variable repsen_fthermp "Feeling Thermometer: Senate Republican Candidate (post)"
replace repsen_ftherm=. if inrange(V202149, -9, -1) | V202149==998 | V202149==999
codebook V202149
codebook repsen_fthermp

codebook V202150
gen indsen_fthermp = V202150
label variable indsen_fthermp "Feeling Thermometer: Senate Ind/3rd-Party Candidate (post)"
replace indsen_fthermp=. if inrange(V202150, -9, -1) | V202150==999
codebook V202150
codebook indsen_fthermp

codebook V202151
gen demsen_spcl_fthermp = V202151
label variable demsen_spcl_fthermp "Feeling Thermometer: Special Senate Democratic Candidate (post)"
replace demsen_spcl_fthermp=. if inrange(V202151, -9, -1)
codebook V202151
codebook demsen_spcl_fthermp

codebook V202152
gen repsen_spcl_fthermp = V202152
label variable repsen_spcl_fthermp "Feeling Thermometer: Special Senate Repbulcian Candidate (post)"
replace repsen_spcl_ftherm=. if inrange(V202152, -9, -1) | V202152==999
codebook V202152
codebook repsen_spcl_fthermp

codebook V202153
gen norace_srsen_fthermp = V202153
label variable norace_srsen_fthermp "Feeling Thermometer: Sr. Senator in state without race (post)"
replace norace_srsen_fthermp=. if inrange(V202153, -9, -1) | V202153==998 | V202153==999
codebook V202153
codebook norace_srsen_fthermp

codebook V202154
gen norace_jrsen_fthermp = V202154
label variable norace_jrsen_fthermp "Feeling Thermometer: Jr. Senator in state without race (post)"
replace norace_jrsen_fthermp=. if inrange(V202154, -9, -1) | V202154==998 | V202154==999
codebook V202154
codebook norace_jrsen_fthermp

codebook V202155
gen nonrun_sen_fthermp = V202155
label variable nonrun_sen_fthermp "Feeling Thermometer: Nonrunning Senator in state with race (post)"
replace nonrun_sen_fthermp=. if inrange(V202155, -9, -1) | V202155==998 | V202155==999
codebook V202155
codebook nonrun_sen_fthermp

codebook V202156
gen harris_fthermp = V202156
label variable harris_fthermp "Feeling Thermometer: Kamala Harris, Democratic Vice-Presidential candidate (post)"
replace harris_fthermp=. if inrange(V202156, -9, -1) | V202156==998 | V202156==999
codebook V202156
codebook harris_fthermp

codebook V202157
gen pence_fthermp = V202157
label variable pence_fthermp "Feeling Thermometer: Mike Pence, Republican Vice-Presidential candidate (post)"
replace pence_fthermp=. if inrange(V202157, -9, -4) | V202157==998 | V202157==999
codebook V202157
codebook pence_fthermp

codebook V202158
gen fauci_fthermp = V202158
label variable fauci_fthermp "Feeling Thermometer: Dr. Anthony Fauci (post)"
replace fauci_fthermp=. if inrange(V202158, -9, -5) | V202158==998 | V202158==999
codebook V202158
codebook fauci_fthermp

codebook V202159
gen christfund_fthermp = V202159
label variable christfund_fthermp "Feeling Thermometer: Christian Fundamentalists (post)"
replace christfund_fthermp=. if inrange(V202159, -9, -4) | V202159==998 | V202159==999
codebook V202159
codebook christfund_fthermp

codebook V202160
gen feminist_fthermp = V202160
label variable feminist_fthermp "Feeling Thermometer: feminists (post)"
replace feminist_fthermp=. if inrange(V202160, -9, -4) | V202160==998 | V202160==999
codebook V202160
codebook feminist_fthermp

codebook V202161
gen liberal_fthermp = V202161
label variable liberal_fthermp "Feeling Thermometer: liberals (post)"
replace liberal_fthermp=. if inrange(V202161, -9, -4) | V202161==999
codebook V202161
codebook liberal_fthermp

codebook V202162
gen union_fthermp = V202162
label variable union_fthermp "Feeling thermometer: labor unions (post)"
replace union_fthermp=. if inrange(V202162, -9, -4) | V202162==998 | V202162==999
codebook V202162
codebook union_fthermp

codebook V202163
gen bigbus_fthermp = V202163
label variable bigbus_fthermp "Feeling Thermometer: big business (post)"
replace bigbus_fthermp=. if inrange(V202163, -9, -4) | V202163==998 | V202163==999
codebook V202163
codebook bigbus_fthermp

codebook V202164
gen conserv_fthermp = V202164
label variable conserv_fthermp "Feeling Thermometer: conservatives (post)"
replace conserv_fthermp=. if inrange(V202164, -9, -4) | V202164==999
codebook V202164
codebook conserv_fthermp

codebook V202165
gen scotus_fthermp = V202165
label variable scotus_fthermp "Feeling Thermometer: U. S. Supreme Court (post)"
replace scotus_fthermp=. if inrange(V202165, -9, -5)
codebook V202165
codebook scotus_fthermp

codebook V202166
gen gay_fthermp = V202166
label variable gay_fthermp "Feeling Thermometer: gay men and lesbians (post)"
replace gay_fthermp=. if inrange(V202166, -9, -5) | V202166==998
codebook V202166
codebook gay_fthermp

codebook V202167
gen congress_fthermp = V202167
label variable congress_fthermp "Feeling Thermometer: Congress (post)"
replace congress_fthermp=. if inrange(V202167, -9, -5) | V202167==998
codebook V202167
codebook congress_fthermp

codebook V202168
gen muslim_fthermp = V202168
label variable muslim_fthermp "Feeling Thermometer: Muslims (post)"
replace muslim_fthermp=. if inrange(V202168, -9, -5) | V202168==998
codebook V202168
codebook muslim_fthermp

codebook V202169
gen christian_fthermp = V202169
label variable christian_fthermp "Feeling Thermometer: Christians (post)"
replace christian_fthermp=. if inrange(V202169, -9, -5) | V202169==998
codebook V202169
codebook christian_fthermp

codebook V202170
gen jew_fthermp = V202170
label variable jew_fthermp "Feeling Thermometer: Jews (post)"
replace jew_fthermp=. if inrange(V202170, -9, -5) | V202170==998
codebook V202170
codebook jew_fthermp

codebook V202171
gen police_fthermp = V202171
label variable police_fthermp "Feeling Thermometer: Police (post)"
replace police_fthermp=. if inrange(V202171, -9, -5)
codebook V202171
codebook police_fthermp

codebook V202172
gen trans_fthermp = V202172
label variable trans_fthermp "Feeling Thermometer: transgender people (post)"
replace trans_fthermp=. if inrange(V202172, -9, -5) | V202172==998
codebook V202172
codebook trans_fthermp

codebook V202173
gen scientist_fthermp = V202173
label variable scientist_fthermp "Feeling Thermometer: sceintists (post)"
replace scientist_fthermp=. if inrange(V202173, -9, -5) | V202173==998
codebook V202173
codebook scientist_fthermp

codebook V202174
gen blm_fthermp = V202174
label variable blm_fthermp "Feeling Thermometer: Black Lives Matter (post)"
replace blm_fthermp=. if inrange(V202174, -9, -5) | V202174==998 | V202174==999
codebook V202174
codebook blm_fthermp

codebook V202175
gen journalist_fthermp = V202175
label variable journalist_fthermp "Feeling Thermometer: journalists (post)"
replace journalist_fthermp=. if inrange(V202175, -9, -5) | V202175==998 | V202175==999
codebook V202175
codebook journalist_fthermp

codebook V202176
gen nato_fthermp = V202176
label variable nato_fthermp "Feeling Thermometer: North Atlantic Treaty Organization (NATO) (post)"
replace nato_fthermp=. if inrange(V202176, -9, -4) | V202176==998 | V202176==999
codebook V202176
codebook nato_fthermp

codebook V202177
gen un_fthermp = V202177
label variable un_fthermp "Feeling Thermometer: United Nations (UN) (post)"
replace un_fthermp=. if inrange(V202177, -9, -4) | V202177==998 | V202177==999
codebook V202177
codebook un_fthermp

codebook V202178
gen nra_fthermp = V202178
label variable nra_fthermp "Feeling Thermometer: National Rifle Association (NRA) (post)"
replace nra_fthermp=. if inrange(V202178, -9, -4) | V202178==998 | V202178==999
codebook V202178
codebook nra_fthermp

codebook V202179
gen socialist_fthermp = V202179
label variable socialist_fthermp "Feeling Thermometer: socialists (post)"
replace socialist_fthermp=. if inrange(V202179, -9, -4) | V202179==998 | V202179==999
codebook V202179
codebook socialist_fthermp

codebook V202180
gen capitalist_fthermp = V202180
label variable capitalist_fthermp "Feeling Thermometer: capitalists (post)"
replace capitalist_fthermp=. if inrange(V202180, -9, -4) | V202180==998 | V202180==999
codebook V202180
codebook capitalist_fthermp

codebook V202181
gen fbi_fthermp = V202181
label variable fbi_fthermp "Feeling Thermometer: Federal Bureau of Investigation (FBI) (post)"
replace fbi_fthermp=. if inrange(V202181, -9, -4) | V202181==998 | V202181==999
codebook V202181
codebook fbi_fthermp

codebook V202182
gen ice_fthermp = V202182
label variable ice_fthermp "Feeling Thermometer: Immigration and Customs Enforcement (ICE) agency (post)"
replace ice_fthermp=. if inrange(V202182, -9, -5) | V202182==998 | V202182==999
codebook V202182
codebook ice_fthermp

codebook V202183
gen metoo_fthermp = V202183
label variable metoo_fthermp "Feeling Thermometer: #MeToo movement (post)"
replace metoo_fthermp=. if inrange(V202183, -9, -5) | V202183==998 | V202183==999
codebook V202183
codebook metoo_fthermp

codebook V202184
gen rural_fthermp = V202184
label variable rural_fthermp "Feeling Thermometer: rural Americans (post)"
replace rural_fthermp=. if inrange(V202184, -9, -5) | V202184==998 | V202184==999
codebook V202184
codebook rural_fthermp

codebook V202185
gen pp_fthermp = V202185
label variable pp_fthermp "Feeling Thermometer: Planned Parenthood (post)"
replace pp_fthermp=. if inrange(V202185, -9, -5) | V202185==998 | V202185==999
codebook V202185
codebook pp_fthermp

codebook V202186
gen who_fthermp = V202186
label variable who_fthermp "Feeling Thermometer: World Health Organization (WHO) (post)"
replace who_fthermp=. if inrange(V202186, -9, -5) | V202186==998 | V202186==999
codebook V202186
codebook who_fthermp

codebook V202187
gen cdc_fthermp = V202187
label variable cdc_fthermp "Feeling Themometer: Center for Disease Control (CDC) (post)"
replace cdc_fthermp=. if inrange(V202187, -9, -5) | V202187==998 | V202187==999
codebook V202187
codebook cdc_fthermp

codebook V202200
gen houseinc_appp = V202200
label variable houseinc_appp "Approve or Disapprove of House incumbent (post)"
replace houseinc_appp=. if inrange(V202200, -9, -1)
replace houseinc_appp=0 if V202200==2
label values houseinc_appp vallab16
codebook V202200
codebook houseinc_appp

///It seems more efficient to code V202203x rather than V202201 and V202202///
codebook V202203x
gen houseinc_app_sump = V202203x
label variable houseinc_app_sump "Summary: Approve/disapprove House incumbent (post)"
replace houseinc_app_sump=. if inrange(V202203x, -7, -1)
replace houseinc_app_sump=1 if V202203x==4
replace houseinc_app_sump=2 if V202203x==3
replace houseinc_app_sump=3 if V202203x==2
replace houseinc_app_sump=4 if V202203x==1
label values houseinc_app_sump vallab17
codebook V202203x
codebook houseinc_app_sump

codebook V202204
gen houseinc_jobp = V202204
label variable houseinc_jobp "How good a job does House incumbent do in district (post)"
replace houseinc_jobp=. if inrange(V202204, -9, -1)
replace houseinc_jobp=1 if V202204==4
replace houseinc_jobp=2 if V202204==3
replace houseinc_jobp=3 if V202204==2
replace houseinc_jobp=4 if V202204==1
label define vallab121 1 "Very poor" 2 "Fairly poor" 3 "Fairly good" 4 "Very good"
label values houseinc_jobp vallab121
codebook V202204
codebook houseinc_jobp

///V202205 and V202205y all -2///
codebook V202206
gen mip1_partyp = V202206
label variable mip1_partyp "Party to deal with mention 1 MIP (post)"
replace mip1_partyp=. if inrange(V202206, -7, -1)
replace mip1_partyp=0 if V202206==3
label define vallab122 0 "Wouldn't be much difference" 1 "Democrats" 2 "Republicans"
label values mip1_partyp vallab122
codebook V202206
codebook mip1_partyp

gen mip1_dempartyp = V202206
label variable mip1_dempartyp "Democrats the party to deal with mention 1 MIP dummy (post)"
replace mip1_dempartyp=. if inrange(V202206, -7, -1)
replace mip1_dempartyp=0 if V202206==2 | V202206==3
label values mip1_dempartyp vallab1
codebook V202206
codebook mip1_dempartyp

gen mip1_reppartyp = V202206
label variable mip1_reppartyp "Republicans the party to deal with mention 1 MIP dummy (post)"
replace mip1_reppartyp=. if inrange(V202206, -7, -1)
replace mip1_reppartyp=0 if V202206==1 | V202206==3
replace mip1_reppartyp=1 if V202206==2
label values mip1_reppartyp vallab1
codebook V202206
codebook mip1_reppartyp

gen mip1_nodiffp = V202206
label variable mip1_nodiffp "Wouldn't be much difference with party to deal with mention 1 MIP dummy (post)"
replace mip1_nodiffp=. if inrange(V202206, -7, -1)
replace mip1_nodiffp=0 if V202206==1 | V202206==2
replace mip1_nodiffp=1 if V202206==3
label values mip1_nodiffp vallab1
codebook V202206
codebook mip1_nodiffp

codebook V202208
gen mip2_partyp = V202208
label variable mip2_partyp "Party to deal with mention 2 MIP (post)"
replace mip2_partyp=. if inrange(V202208, -7, -1)
replace mip2_partyp=0 if V202208==3
label values mip2_partyp vallab122
codebook V202208
codebook mip2_partyp

gen mip2_dempartyp = V202208
label variable mip2_dempartyp "Democrats the party to deal with mention 2 MIP dummy (post)"
replace mip2_dempartyp=. if inrange(V202208, -7, -1)
replace mip2_dempartyp=0 if V202208==2 | V202208==3
label values mip2_dempartyp vallab1
codebook V202208
codebook mip2_dempartyp

gen mip2_reppartyp = V202208
label variable mip2_reppartyp "Republicans the party to deal with mention 2 MIP dummy (post)"
replace mip2_reppartyp=. if inrange(V202208, -7, -1)
replace mip2_reppartyp=0 if V202208==1 | V202208==3
replace mip2_reppartyp=1 if V202208==2
label values mip2_reppartyp vallab1
codebook V202208
codebook mip2_reppartyp

gen mip2_nodiffp = V202208
label variable mip2_nodiffp "Wouldn't be much difference with party to deal with mention 2 MIP dummy (post)"
replace mip2_nodiffp=. if inrange(V202208, -7, -1)
replace mip2_nodiffp=0 if V202208==1 | V202208==2
replace mip2_nodiffp=1 if V202208==3
label values mip2_nodiffp vallab1
codebook V202208
codebook mip2_nodiffp

codebook V202210
gen mip3_partyp = V202210
label variable mip3_partyp "Party to deal with mention 3 MIP (post)"
replace mip3_partyp=. if inrange(V202210, -7, -1)
replace mip3_partyp=0 if V202210==3
label values mip3_partyp vallab122
codebook V202210
codebook mip3_partyp

gen mip3_dempartyp = V202210
label variable mip3_dempartyp "Democrats the party to deal with mention 3 MIP dummy (post)"
replace mip3_dempartyp=. if inrange(V202210, -7, -1)
replace mip3_dempartyp=0 if V202210==2 | V202210==3
label values mip3_dempartyp vallab1
codebook V202210
codebook mip3_dempartyp

gen mip3_reppartyp = V202210
label variable mip3_reppartyp "Republicans the party to deal with mention 3 MIP dummy (post)"
replace mip3_reppartyp=. if inrange(V202210, -7, -1)
replace mip3_reppartyp=0 if V202210==1 | V202210==3
replace mip3_reppartyp=1 if V202210==2
label values mip3_reppartyp vallab1
codebook V202210
codebook mip3_reppartyp

gen mip3_nodiffp = V202210
label variable mip3_nodiffp "Wouldn't be much difference with party to deal with mention 3 MIP dummy (post)"
replace mip3_nodiffp=. if inrange(V202210, -7, -1)
replace mip3_nodiffp=0 if V202210==1 | V202210==2
replace mip3_nodiffp=1 if V202210==3
label values mip3_nodiffp vallab1
codebook V202210
codebook mip3_nodiffp

///V202211 and V202211y all -2///
codebook V202212
gen po_dont_carep = V202212
label variable po_dont_carep "Public officials don't care what people think (post)"
replace po_dont_carep=. if inrange(V202212, -9, -4)
replace po_dont_carep=1 if V202212==5
replace po_dont_carep=2 if V202212==4
replace po_dont_carep=4 if V202212==2
replace po_dont_carep=5 if V202212==1
label values po_dont_carep vallab105
tab V202212
codebook po_dont_carep

codebook V202213
gen no_sayp = V202213
label variable no_sayp "Have no say about what government does (post)"
replace no_sayp=. if inrange(V202213, -9, -5)
replace no_sayp=1 if V202213==5
replace no_sayp=2 if V202213==4
replace no_sayp=4 if V202213==2
replace no_sayp=5 if V202213==1
label values no_sayp vallab105
codebook V202213
codebook no_sayp

codebook V202214
gen pol_complicatedp = V202214
label variable pol_complicatedp "Politics/Government too complicated to understand (post)"
replace pol_complicatedp=. if inrange(V202214, -9, -4)
replace pol_complicatedp=0 if V202214==5
replace pol_complicatedp=1 if V202214==4
replace pol_complicatedp=2 if V202214==3
replace pol_complicatedp=3 if V202214==2
replace pol_complicatedp=4 if V202214==1
label values pol_complicatedp vallab2
tab V202214
codebook pol_complicatedp

codebook V202215
gen pol_understandingp = V202215
label variable pol_understandingp "How well does R understand important political issues (post)"
replace pol_understandingp=. if inrange(V202215, -9, -5)
replace pol_understandingp=0 if V202215==5
replace pol_understandingp=1 if V202215==4
replace pol_understandingp=2 if V202215==3
replace pol_understandingp=3 if V202215==2
replace pol_understandingp=4 if V202215==1
label values pol_understandingp vallab20
codebook V202215
codebook pol_understanding

codebook V202216
gen party_diffp = V202216
label variable party_diffp "Important differences in what major parties stand for dummy (post)"
replace party_diffp=. if inrange(V202216, -9, -5)
replace party_diffp=0 if V202216==2
label values party_diffp vallab1
codebook V202216
codebook party_diffp

codebook V202217
gen conservative_diffp = V202217
label variable conservative_diffp "Is one of the parties more conservative than the other dummy (post)"
replace conservative_diffp=. if inrange(V202217, -9, -5)
replace conservative_diffp=0 if V202217==2
label values conservative_diffp vallab1
codebook V202217
codebook conservative_diffp

codebook V202218
gen dem_conservativep = V202218
label variable dem_conservativep "Democrats are the party that is more conservative dummy (post)"
replace dem_conservativep=. if inrange(V202218, -9, -1)
replace dem_conservativep=0 if V202218==2
label values dem_conservativep vallab1
codebook V202218
codebook dem_conservativep

gen rep_conservativep = V202218
label variable rep_conservativep "Republicans are the party that is more conservative dummy (post)"
replace rep_conservativep=. if inrange(V202218, -9, -1)
replace rep_conservativep=0 if V202218==1
replace rep_conservativep=1 if V202218==2
label values rep_conservativep vallab1
codebook V202218
codebook rep_conservativep

codebook V202219
gen freq_faircountp = V202219
label variable freq_faircountp "How often are votes counted fairly (post)"
replace freq_faircountp=. if inrange(V202219, -9, -5)
replace freq_faircountp=0 if V202219==5
replace freq_faircountp=1 if V202219==4
replace freq_faircountp=2 if V202219==3
replace freq_faircountp=3 if V202219==2
replace freq_faircountp=4 if V202219==1
label values freq_faircountp vallab2
tab V202219
codebook freq_faircountp

codebook V202220
gen hispanic_elected_impp = V202220
label variable hispanic_elected_impp "How important that more Hispanics get elected to political office (post)"
replace hispanic_elected_impp=. if inrange(V202220, -9, -5)
replace hispanic_elected_impp=0 if V202220==5
replace hispanic_elected_impp=1 if V202220==4
replace hispanic_elected_impp=2 if V202220==3
replace hispanic_elected_impp=3 if V202220==2
replace hispanic_elected_impp=4 if V202220==1
label values hispanic_elected_impp vallab30
tab V202220
codebook hispanic_elected_impp

codebook V202221
gen black_elected_impp = V202221
label variable black_elected_impp "How important that blacks get elected to political office (post)"
replace black_elected_impp=. if inrange(V202221, -9, -5)
replace black_elected_impp=0 if V202221==5
replace black_elected_impp=1 if V202221==4
replace black_elected_impp=2 if V202221==3
replace black_elected_impp=3 if V202221==2
replace black_elected_impp=4 if V202221==1
label values black_elected_impp vallab30
tab V202221
codebook black_elected_impp

codebook V202222
tab V202222
gen asian_elected_impp = V202222
label variable asian_elected_impp "How important that more asians get elected to political office (post)"
replace asian_elected_impp=. if inrange(V202222, -9, -5)
replace asian_elected_impp=0 if V202222==5
replace asian_elected_impp=1 if V202222==4
replace asian_elected_impp=2 if V202222==3
replace asian_elected_impp=3 if V202222==2
replace asian_elected_impp=4 if V202222==1
label values asian_elected_impp vallab30
tab V202222
codebook asian_elected_impp

codebook V202223
gen lgbt_elected_impp = V202223
label variable lgbt_elected_impp "How importnat that more LGBT people get elected to office"
replace lgbt_elected_impp=. if inrange(V202223, -9, -5)
replace lgbt_elected_impp=0 if V202223==5
replace lgbt_elected_impp=1 if V202223==4
replace lgbt_elected_impp=2 if V202223==3
replace lgbt_elected_impp=3 if V202223==2
replace lgbt_elected_impp=4 if V202223==1
label values lgbt_elected_impp vallab30
tab V202223
codebook lgbt_elected_impp

codebook V202224
gen women_elected_impp = V202224
label variable women_elected_impp "How important that more women get elected to political office (post)"
replace women_elected_impp=. if inrange(V202224, -9, -5)
replace women_elected_impp=0 if V202224==5
replace women_elected_impp=1 if V202224==4
replace women_elected_impp=2 if V202224==3
replace women_elected_impp=3 if V202224==2
replace women_elected_impp=4 if V202224==1
label values women_elected_impp vallab30
tab V202224
codebook women_elected_impp

codebook V202225
gen camp_spendingp = V202225
label variable camp_spendingp "Limits on campaign spending (post)"
replace camp_spendingp=. if inrange(V202225, -9, -5)
replace camp_spendingp=1 if V202225==2
replace camp_spendingp=2 if V202225==3
replace camp_spendingp=3 if V202225==1
label values camp_spendingp vallab60
codebook V202225
codebook camp_spendingp

codebook V202226
gen cong_benefit_contriborgp = V202226
label variable cong_benefit_contriborgp "Congress pass laws that benefit contributor organization (post)"
replace cong_benefit_contriborgp=. if inrange(V202226, -9, -5)
replace cong_benefit_contriborgp=0 if V202226==5
replace cong_benefit_contriborgp=1 if V202226==4
replace cong_benefit_contriborgp=2 if V202226==3
replace cong_benefit_contriborgp=3 if V202226==2
replace cong_benefit_contriborgp=4 if V202226==1
label values cong_benefit_contriborgp vallab58
tab V202226
codebook cong_benefit_contriborgp

codebook V202227
gen cong_benefit_contribindp = V202227
label variable cong_benefit_contribindp "Congress pass laws that benefit contributor individuals (post)"
replace cong_benefit_contribindp=. if inrange(V202227, -9, -5)
replace cong_benefit_contribindp=0 if V202227==5
replace cong_benefit_contribindp=1 if V202227==4
replace cong_benefit_contribindp=2 if V202227==3
replace cong_benefit_contribindp=3 if V202227==2
replace cong_benefit_contribindp=4 if V202227==1
label values cong_benefit_contribindp vallab58
tab V202227
codebook cong_benefit_contribindp

codebook V202228
gen cong_change_votesp = V202228
label variable cong_change_votesp "Congress change votes because of donation to campaign (post)"
replace cong_change_votesp=. if inrange(V202228, -9, -5)
replace cong_change_votesp=0 if V202228==1
replace cong_change_votesp=1 if V202228==2
replace cong_change_votesp=2 if V202228==3
replace cong_change_votesp=3 if V202228==4
replace cong_change_votesp=4 if V202228==5
label values cong_change_votesp vallab102
tab V202228
codebook cong_change_votesp

codebook V202229
gen limit_importp = V202229
label variable limit_importp "Favor placing limits on imports dummy (post)"
replace limit_importp=. if inrange(V202229, -9, -5)
replace limit_importp=0 if V202229==2
label values limit_importp vallab1
codebook V202229
codebook limit_importp

codebook V202231x
gen limit_import_sump = V202231x
label variable limit_import_sump "Summary: Favor/Oppose new limits on imports (post)"
replace limit_import_sump=. if inrange(V202231x, -7, -2)
replace limit_import_sump=1 if V202231x==4
replace limit_import_sump=2 if V202231x==3
replace limit_import_sump=3 if V202231x==2
replace limit_import_sump=4 if V202231x==1
label values limit_import_sump vallab53
codebook V202231x
codebook limit_import_sump

codebook V202232
gen imm_lvlp = V202232
label variable imm_lvlp "What should immigration levels be (post)"
replace imm_lvlp=. if inrange(V202232, -9, -5)
replace imm_lvlp=1 if V202232==5
replace imm_lvlp=2 if V202232==4
replace imm_lvlp=4 if V202232==2
replace imm_lvlp=5 if V202232==1
label values imm_lvlp vallab43
tab V202232
codebook imm_lvlp

codebook V202233
gen imm_jobsp = V202233
label variable imm_jobsp "How likely immigration will take away jobs (post)"
replace imm_jobsp=. if inrange(V202233, -9, -5)
replace imm_jobsp=0 if V202233==4
replace imm_jobsp=1 if V202233==3
replace imm_jobsp=2 if V202233==2
replace imm_jobsp=3 if V202233==1
label define vallab123 0 "Not likely at all" 1 "Somewhat likely" 2 "Very likely" 3 "Extremely likely"
label values imm_jobsp vallab123
codebook V202233
codebook imm_jobsp

codebook V202234
gen allow_refugeesp = V202234
label variable allow_refugeesp "Favor or oppose allowing refugees to come to US (post)"
replace allow_refugeesp=. if inrange(V202234, -9, -5)
replace allow_refugeesp=1 if V202234==2
replace allow_refugeesp=2 if V202234==3
replace allow_refugeesp=3 if V202234==1
label values allow_refugees vallab60
codebook V202234
codebook allow_refugeesp

codebook V202236x
gen allow_refugees_sump = V202236x
label variable allow_refugees_sump "Summary: Favor/Oppose allowing refugees to come to US (post)"
replace allow_refugees_sump=. if inrange(V202236x, -7, -2)
replace allow_refugees_sump=1 if V202236x==7
replace allow_refugees_sump=2 if V202236x==6
replace allow_refugees_sump=3 if V202236x==5
replace allow_refugees_sump=5 if V202236x==3
replace allow_refugees_sump=6 if V202236x==2
replace allow_refugees_sump=7 if V202236x==1
label values allow_refugees_sump vallab61
tab V202236x
codebook allow_refugees_sump

codebook V202237
gen illimm_crimep = V202237
label variable illimm_crimep "Effect of illegal immigration on crime rate (post)"
replace illimm_crimep=. if inrange(V202237, -9, -5)
replace illimm_crimep=1 if V202237==2
replace illimm_crimep=2 if V202237==3
replace illimm_crimep=3 if V202237==1
label define vallab124 1 "Decrease" 2 "Have no effect" 3 "Increase"
label values illimm_crimep vallab124
codebook V202237
codebook illimm_crimep

codebook V202239x
gen illimm_crime_sump = V202239x
label variable illimm_crime_sump "Summary: effect on illegal immigration on crime rate (post)"
replace illimm_crime_sump=. if inrange(V202239x, -7, -2)
replace illimm_crime_sump=1 if V202239x==7
replace illimm_crime_sump=2 if V202239x==6
replace illimm_crime_sump=3 if V202239x==5
replace illimm_crime_sump=5 if V202239x==3
replace illimm_crime_sump=6 if V202239x==2
replace illimm_crime_sump=7 if V202239x==1
label define vallab125 1 "Decrease a lot" 2 "Decrease a moderate amount" 3 "Decrease a little" 4 "Have no effect" 5 "Increase a little" 6 "Increase a moderate amount" 7 "Increase a lot"
label values illimm_crime_sump vallab125
tab V202239x
codebook illimm_crime_sump

codebook V202240
gen path_citizenp = V202240
label variable path_citizenp "Favor or oppose providing path to citizenship (post)"
replace path_citizenp=. if inrange(V202240, -9, -5)
replace path_citizenp=1 if V202240==2
replace path_citizenp=2 if V202240==3
replace path_citizenp=3 if V202240==1
label values path_citizenp vallab60
codebook V202240
codebook path_citizenp

codebook V202242x
gen path_citizen_sump = V202242x
label variable path_citizen_sump "Summary: Favor/oppose providing path to citizenship (post)"
replace path_citizen_sump=. if inrange(V202242x, -7, -2)
replace path_citizen_sump=1 if V202242x==7
replace path_citizen_sump=2 if V202242x==6
replace path_citizen_sump=3 if V202242x==5
replace path_citizen_sump=5 if V202242x==3
replace path_citizen_sump=6 if V202242x==2
replace path_citizen_sump=7 if V202242x==1
label values path_citizen_sump vallab61
tab V202242x
codebook path_citizen_sump

codebook V202243
gen return_immp = V202243
label variable return_immp "Favor or oppose returning unauthorized immigrants to native country (post)"
replace return_immp=. if inrange(V202243, -9, -5)
replace return_immp=1 if V202243==2
replace return_immp=2 if V202243==3
replace return_immp=3 if V202243==1
label values return_immp vallab60
codebook V202243
codebook return_immp

codebook V202245x
gen return_imm_sump = V202245x
label variable return_imm_sump "Summary: favor/oppose returning unauthorized immigrants to native country (post)"
replace return_imm_sump=. if inrange(V202245x, -7, -2)
replace return_imm_sump=1 if V202245x==7
replace return_imm_sump=2 if V202245x==6
replace return_imm_sump=3 if V202245x==5
replace return_imm_sump=5 if V202245x==3
replace return_imm_sump=6 if V202245x==2
replace return_imm_sump=7 if V202245x==1
label values return_imm_sump vallab61
tab V202245x
codebook return_imm_sump

codebook V202246
gen separate_childrenp = V202246
label variable separate_childrenp "Favor or oppose separating children of detained immigrants (post)"
replace separate_childrenp=. if inrange(V202246, -9, -5)
replace separate_childrenp=1 if V202246==2
replace separate_childrenp=2 if V202246==3
replace separate_childrenp=3 if V202246==1
label values separate_childrenp vallab60
codebook V202246
codebook separate_childrenp

codebook V202248x
gen separate_children_sump = V202248x
label variable separate_children_sump "Summary: Favor/oppose separating children of detained immigrants (post)"
replace separate_children_sump=. if inrange(V202248x, -7, -2)
replace separate_children_sump=1 if V202248x==7
replace separate_children_sump=2 if V202248x==6
replace separate_children_sump=3 if V202248x==5
replace separate_children_sump=5 if V202248x==3
replace separate_children_sump=6 if V202248x==2
replace separate_children_sump=7 if V202248x==1
label values separate_children_sump vallab61
tab V202248x
codebook separate_children_sump

codebook V202249
gen aa_blackp = V202249
label variable aa_blackp "For or against preferential hiring/promotion of blacks dummy (post)"
replace aa_blackp=. if inrange(V202249, -9, -5)
replace aa_blackp=0 if V202249==2
label values aa_blackp vallab1
codebook V202249
codebook aa_blackp

codebook V202252x
gen aa_black_sump = V202252x
label variable aa_black_sump "Summary: favor/oppose preferential hiring/promotion of blacks (post)"
replace aa_black_sump=. if inrange(V202252x, -7, -2)
replace aa_black_sump=1 if V202252x==4
replace aa_black_sump=2 if V202252x==3
replace aa_black_sump=3 if V202252x==2
replace aa_black_sump=4 if V202252x==1
label values aa_black_sump vallab53
codebook V202252x
codebook aa_black_sump

codebook V202253
gen more_govp = V202253
label variable more_govp "More things that the government should be doing dummy (post)"
replace more_govp=. if inrange(V202253, -9, -5)
replace more_govp=0 if V202253==1
replace more_govp=1 if V202253==2
label values more_govp vallab1
codebook V202253
codebook more_govp

gen less_govp = V202253
label variable less_govp "Less govenment better dummy (post)"
replace less_govp=. if inrange(V202253, -9, -5)
replace less_govp=0 if V202253==2
label values less_govp vallab1
codebook V202253
codebook less_govp

codebook V202255x
gen gov_amount_sump = V202255x
label variable gov_amount_sump "Summary: more or less government (post)"
replace gov_amount_sump=. if inrange(V202255x, -7, -2)
label define vallab126 1 "Feels strongly less government better" 2 "Feels somewhat strongly less government better" 3 "Feels not strongly less government better" 4 "Feels not strongly more things governemnt should be doing" 5 "Feels somewhat strongly more things government should be doing" 6 "Feels strongly more things government should be doing"
label values gov_amount_sump vallab126
tab V202255x
codebook gov_amount_sump

codebook V202256
gen govreg_amountp = V202256
label variable govreg_amountp "Would it be good for society to have more or less government regulation (post)"
replace govreg_amountp=. if inrange(V202256, -9, -5)
replace govreg_amountp=1 if V202256==7
replace govreg_amountp=2 if V202256==6
replace govreg_amountp=3 if V202256==5
replace govreg_amountp=5 if V202256==3
replace govreg_amountp=6 if V202256==2
replace govreg_amountp=7 if V202256==1
label define vallab127 1 "Much less" 2 "Somewhat less" 3 "A little less" 4 "About the same amount" 5 "A little more" 6 "Somewhat more" 7 "Much more"
label values govreg_amountp vallab127
tab V202256
codebook govreg_amountp

codebook V202257
gen reduce_income_ineqp = V202257
label variable reduce_income_ineqp "Favor or oppose government trying to reduce income inequality (post)"
replace reduce_income_ineqp=. if inrange(V202257, -9, -5)
replace reduce_income_ineqp=1 if V202257==2
replace reduce_income_ineqp=2 if V202257==3
replace reduce_income_ineqp=3 if V202257==1
label values reduce_income_ineqp vallab60
codebook V202257
codebook reduce_income_ineqp

codebook V202259x
gen reduce_income_ineq_sump = V202259x
label variable reduce_income_ineq_sump "Summary: favor/oppose government trying to reduce income inequality (post)"
replace reduce_income_ineq_sump=. if inrange(V202259x, -7, -2)
replace reduce_income_ineq_sump=1 if V202259x==7
replace reduce_income_ineq_sump=2 if V202259x==6
replace reduce_income_ineq_sump=3 if V202259x==5
replace reduce_income_ineq_sump=5 if V202259x==3
replace reduce_income_ineq_sump=6 if V202259x==2
replace reduce_income_ineq_sump=7 if V202259x==1
label values reduce_income_ineq_sump vallab61
tab V202259x
codebook reduce_income_ineq_sump

codebook V202260
gen equal_oppp = V202260
label variable equal_oppp "Society should make sure everyone has equal opportunity (post)"
replace equal_oppp=. if inrange(V202260, -9, -5)
replace equal_oppp=1 if V202260==5
replace equal_oppp=2 if V202260==4
replace equal_oppp=4 if V202260==2
replace equal_oppp=5 if V202260==1
label values equal_oppp vallab105
codebook V202260
codebook equal_oppp

codebook V202261
gen less_eqworryp = V202261
label variable less_eqworryp "We'd be better off if worried less about equality (post)"
replace less_eqworryp=. if inrange(V202261, -9, -5)
replace less_eqworryp=1 if V202261==5
replace less_eqworryp=2 if V202261==4
replace less_eqworryp=4 if V202261==2
replace less_eqworryp=5 if V202261==1
label values less_eqworryp vallab105
tab V202261
codebook less_eqworryp

codebook V202262
gen ineq_not_probp = V202262
label variable ineq_not_probp "Not a big problem if some have more chance in life (post)"
replace ineq_not_probp=. if inrange(V202262, -9, -5)
replace ineq_not_probp=1 if V202262==5
replace ineq_not_probp=2 if V202262==4
replace ineq_not_probp=4 if V202262==2
replace ineq_not_probp=5 if V202262==1
label values ineq_not_probp vallab105
codebook V202262
codebook ineq_not_probp

codebook V202263
gen treat_fairp = V202263
label variable treat_fairp "If people were treated more fairly we would have fewer problems (post)"
replace treat_fairp=. if inrange(V202263, -9, -5)
replace treat_fairp=1 if V202263==5
replace treat_fairp=2 if V202263==4
replace treat_fairp=4 if V202263==2
replace treat_fairp=5 if V202263==1
label values treat_fairp vallab105
tab V202263
codebook treat_fairp

codebook V202264
gen adjust_moralsp = V202264
label variable adjust_moralsp "The world is changing & we should adjust view of moral behavior (post)"
replace adjust_moralsp=. if inrange(V202264, -9, -5)
replace adjust_moralsp=1 if V202264==5
replace adjust_moralsp=2 if V202264==4
replace adjust_moralsp=4 if V202264==2
replace adjust_moralsp=5 if V202264==1
label values adjust_moralsp vallab105
tab V202264
codebook adjust_moralsp

codebook V202265
gen trad_valuesp = V202265
label variable trad_valuesp "Fewer problems if there was more emphasis on tradiitonal family values (post)"
replace trad_valuesp=. if inrange(V202265, -9, -5)
replace trad_valuesp=1 if V202265==5
replace trad_valuesp=2 if V202265==4
replace trad_valuesp=4 if V202265==2
replace trad_valuesp=5 if V202265==1
label values trad_valuesp vallab105
tab V202265
codebook trad_valuesp

codebook V202266
///This seemed better to code as two dummies. I did not make one for both as only 30 people answered that///
gen child_independentp = V202266
label variable child_independentp "Child trait of independence more important than respect for elders dummy (post)"
replace child_independentp=. if inrange(V202266, -9, -5)
replace child_independentp=0 if V202266==2 | V202266==3
label values child_independentp vallab1
codebook V202266
codebook child_independentp

gen child_respectp = V202266
label variable child_respectp "Child trait of respect for elders more important than independence dummy (post)"
replace child_respectp=. if inrange(V202266, -9, -5)
replace child_respectp=0 if V202266==1 | V202266==3
replace child_respectp=1 if V202266==2
label values child_respectp vallab1
codebook V202266
codebook child_respectp

codebook V202267
gen child_curiousp = V202267
label variable child_curiousp "Child trait of curiosity more important than good manners dummy (post)"
replace child_curiousp=. if inrange(V202267, -9, -5)
replace child_curiousp=0 if V202267==2 | V202267==3
label values child_curiousp vallab1
codebook V202267
codebook child_curiousp

gen child_mannersp = V202267
label variable child_mannersp "Child trait of good manners more important than curiousity dummy (post)"
replace child_mannersp=. if inrange(V202267, -9, -5)
replace child_mannersp=0 if V202267==1 | V202267==3
replace child_mannersp=1 if V202267==2
label values child_mannersp vallab1
codebook V202267
codebook child_mannersp

codebook V202268
gen child_obediencep = V202268
label variable child_obediencep "Child trait of obedience more important than self-reliance dummy (post)"
replace child_obediencep=. if inrange(V202268, -9, -5)
replace child_obediencep=0 if inrange(V202268, 2, 4)
label values child_obediencep vallab1
codebook V202268
codebook child_obediencep

gen child_reliancep = V202268
label variable child_reliancep "Child trait of self-reliance more important than obedience dummy (post)"
replace child_reliancep=. if inrange(V202268, -9, -5)
replace child_reliancep=1 if V202268==2
replace child_reliancep=0 if V202268==1 | V202268==3 | V202268==4
label values child_reliancep vallab1
codebook V202268
codebook child_reliancep

codebook V202269
gen child_consideratep = V202269
label variable child_consideratep "Child trait of being considerate more important than being well-behaved dummy (post)"
replace child_consideratep=. if inrange(V202269, -9, -5)
replace child_consideratep=0 if V202269==2 | V202269==3
label values child_consideratep vallab1
codebook V202269
codebook child_consideratep

gen child_behavep = V202269
label variable child_behavep "Child trait of being well-behaved more important than being considate dummy (post)"
replace child_behavep=. if inrange(V202269, -9, -5)
replace child_behavep=0 if V202269==1 | V202269==3
replace child_behavep=1 if V202269==2
label values child_behavep vallab1
codebook V202269
codebook child_behavep

codebook V202270
gen world_amerp = V202270
label variable world_amerp "Better if rest of world like America (post)"
replace world_amerp=. if inrange(V202270, -9, -5)
replace world_amerp=1 if V202270==5
replace world_amerp=2 if V202270==4
replace world_amerp=4 if V202270==2
replace world_amerp=5 if V202270==1
label values world_amerp vallab105
tab V202270
codebook world_amerp

codebook V202271
gen us_othersp = V202271
label variable us_othersp "Is the US better or worse than most other countries (post)"
replace us_othersp=. if inrange(V202271, -9, -5)
replace us_othersp=1 if V202271==2
replace us_othersp=2 if V202271==3
replace us_othersp=3 if V202271==1
label values us_othersp vallab45
codebook V202271
codebook us_othersp

codebook V202273x
gen us_others_sump = V202273x
label variable us_others_sump "Summary: US better or worse than most other countries (post)"
replace us_others_sump=. if inrange(V202273x, -7, -2)
replace us_others_sump=1 if V202273x==5
replace us_others_sump=2 if V202273x==4
replace us_others_sump=4 if V202273x==2
replace us_others_sump=5 if V202273x==1
label values us_others_sump vallab46
codebook V202273x
codebook us_others_sump

codebook V202274
gen rural_helpp = V202274
label variable rural_helpp "People in rural areas get more or less from government (post)"
replace rural_helpp=. if inrange(V202274, -9, -5)
replace rural_helpp=1 if V202274==3
replace rural_helpp=3 if V202274==1
label values rural_helpp vallab47
codebook V202274
codebook rural_helpp

codebook V202276x
gen rural_help_sump = V202276x
label variable rural_help_sump "Summary: people in rural areas get more/less from government (post)"
replace rural_help_sump=. if inrange(V202276x, -7, -2)
replace rural_help_sump=1 if V202276x==1
replace rural_help_sump=2 if V202276x==2
replace rural_help_sump=3 if V202276x==3
replace rural_help_sump=5 if V202276x==5
replace rural_help_sump=6 if V202276x==6
replace rural_help_sump=7 if V202276x==7
label define vallab128 1 "A great deal less" 2 "Moderately less" 3 "A little less" 4 "The same" 5 "A little more" 6 "Moderately more" 7 "A great deal more"
label values rural_help_sump vallab128
tab V202276x
codebook rural_help_sump

codebook V202277
gen rural_influencep = V202277
label variable rural_influencep "People in rural areas have too much or too little influence (post)"
replace rural_influencep=. if inrange(V202277, -9, -5)
replace rural_influencep=1 if V202277==2
replace rural_influencep=2 if V202277==3
replace rural_influencep=3 if V202277==1
label define vallab129 1 "Too little" 2 "About the right amount" 3 "Too much"
label values rural_influencep vallab129
codebook V202277
codebook rural_influencep

codebook V202279x
gen rural_influence_sump = V202279x
label variable rural_influence_sump "Summary: people in rural areas have too much/too little influence (post)"
replace rural_influence_sump=. if inrange(V202279x, -7, -2)
replace rural_influence_sump=1 if V202279x==1
replace rural_influence_sump=2 if V202279x==2
replace rural_influence_sump=3 if V202279x==3
replace rural_influence_sump=5 if V202279x==5
replace rural_influence_sump=6 if V202279x==6
replace rural_influence_sump=7 if V202279x==7
label define vallab130 1 "Much too little" 2 "Somewhat too little" 3 "A little too little" 4 "About the right amount" 5 "A little too much" 6 "Somewhat too much" 7 "Much too much"
label values rural_influence_sump vallab130
tab V202279x
codebook rural_influence_sump

codebook V202280
gen rural_respectp = V202280
label variable rural_respectp "People in rural areas get too much or too little respect (post)"
replace rural_respectp=. if inrange(V202280, -9, -5)
replace rural_respectp=1 if V202280==2
replace rural_respectp=2 if V202280==3
replace rural_respectp=3 if V202280==1
label values rural_respectp vallab129
codebook V202280
codebook rural_respectp

codebook V202282x
gen rural_respect_sump = V202282x
label variable rural_respect_sump "Summary: people in rural areas get too much/too little respect (post)"
replace rural_respect_sump=. if inrange(V202282x, -7, -2)
replace rural_respect_sump=1 if V202282x==1
replace rural_respect_sump=2 if V202282x==2
replace rural_respect_sump=3 if V202282x==3
replace rural_respect_sump=5 if V202282x==5
replace rural_respect_sump=6 if V202282x==6
replace rural_respect_sump=7 if V202282x==7
label values rural_respect_sump vallab130
tab V202282x
codebook rural_respect_sump

codebook V202283
gen mom_bondp = V202283
label variable mom_bondp "Easier or harder for working mother to bond with child (post)"
replace mom_bondp=. if inrange(V202283, -9, -5)
replace mom_bondp=1 if V202283==2
replace mom_bondp=2 if V202283==3
replace mom_bondp=3 if V202283==1
label define vallab131 1 "Harder" 2 "Neither easier nor harder" 3 "Easier"
label values mom_bondp vallab131
codebook V202283
codebook mom_bondp

codebook V202286x
gen mom_bond_sump = V202286x
label variable mom_bond_sump "Summary: Easier/harder for working mother to bond with child (post)"
replace mom_bond_sump=. if inrange(V202286x, -7, -2)
replace mom_bond_sump=1 if V202286x==7
replace mom_bond_sump=2 if V202286x==6
replace mom_bond_sump=3 if V202286x==5
replace mom_bond_sump=5 if V202286x==3
replace mom_bond_sump=6 if V202286x==2
replace mom_bond_sump=7 if V202286x==1
label define vallab132 1 "A great deal harder" 2 "Somewhat harder" 3 "Slightly harder" 4 "Neither easier nor harder" 5 "Slightly easier" 6 "Somewhat easier" 7 "A great deal easier"
label values mom_bond_sum vallab132
tab V202286x
codebook mom_bond_sump

codebook V202287
gen man_worksp = V202287
label variable man_worksp "Better or worse if man works and woman takes care of home (post)"
replace man_worksp=. if inrange(V202287, -9, -5)
replace man_worksp=1 if V202287==2
replace man_worksp=2 if V202287==3
replace man_worksp=3 if V202287==1
label values man_worksp vallab45
codebook V202287
codebook man_worksp

codebook V202290x
gen man_works_sump = V202290x
label variable man_works_sump "Summary: better/worse if man works and woman takes care of home (post)"
replace man_works_sump=. if inrange(V202290x, -7, -2)
replace man_works_sump=1 if V202290x==7
replace man_works_sump=2 if V202290x==6
replace man_works_sump=3 if V202290x==5
replace man_works_sump=5 if V202290x==3
replace man_works_sump=6 if V202290x==2
replace man_works_sump=7 if V202290x==1
label define vallab133 1 "Much worse" 2 "Somewhat worse" 3 "Slightly worse" 4 "Makes no difference" 5 "Slightly better" 6 "Somewhat better" 7 "Much better"
label values man_works_sump vallab133
tab V202290x
codebook man_works_sump

codebook V202291
gen feminist_favorsp = V202291
label variable feminist_favorsp "Do women demaning eqality seek special favors (post)"
replace feminist_favorsp=. if inrange(V202291, -9, -5)
replace feminist_favorsp=0 if V202291==5
replace feminist_favorsp=1 if V202291==4
replace feminist_favorsp=2 if V202291==3
replace feminist_favorsp=3 if V202291==2
replace feminist_favorsp=4 if V202291==1
label values feminist_favorsp vallab2
tab V202291
codebook feminist_favorsp

codebook V202292
gen women_complainp = V202292
label variable women_complainp "Do women complaining about discrimination cause more problems (post)"
replace women_complainp=. if inrange(V202292, -9, -5)
replace women_complainp=0 if V202292==5
replace women_complainp=1 if V202292==4
replace women_complainp=2 if V202292==3
replace women_complainp=3 if V202292==2
replace women_complainp=4 if V202292==1
label values women_complainp vallab2
tab V202292
codebook women_complainp

codebook V202300
gen black_nofavorsp = V202300
label variable black_nofavorsp "Agree/disagree: blacks should work their way up without special favors (post)"
replace black_nofavorsp=. if inrange(V202300, -9, -5)
replace black_nofavorsp=1 if V202300==5
replace black_nofavorsp=2 if V202300==4
replace black_nofavorsp=4 if V202300==2
replace black_nofavorsp=5 if V202300==1
label values black_nofavorsp vallab105
tab V202300
codebook black_nofavorsp

codebook V202301
gen slavery_difficultp = V202301
label variable slavery_difficultp "Agree/disagree: past slavery & discrimination make it difficult for blacks (post)"
replace slavery_difficultp=. if inrange(V202301, -9, -5)
replace slavery_difficultp=5 if V202301==5
replace slavery_difficultp=4 if V202301==4
replace slavery_difficultp=2 if V202301==2
replace slavery_difficultp=1 if V202301==1
label values slavery_difficultp vallab105
codebook V202301
codebook slavery_difficultp

codebook V202302
gen black_deservep = V202302
label variable black_deservep "Agree/disagree: blacks have gotten less than they deserve (post)"
replace black_deservep=. if inrange(V202302, -9, -5)
replace black_deservep=1 if V202302==1
replace black_deservep=2 if V202302==2
replace black_deservep=4 if V202302==4
replace black_deservep=5 if V202302==5
label values black_deservep vallab105
tab V202302
codebook black_deservep

codebook V202303
gen black_tryhardp = V202303
label variable black_tryhardp "Agree/disagree: if blacks tried harder they'd be as well off as whites (post)"
replace black_tryhardp=. if inrange(V202303, -9, -5)
replace black_tryhardp=1 if V202303==5
replace black_tryhardp=2 if V202303==4
replace black_tryhardp=4 if V202303==2
replace black_tryhardp=5 if V202303==1
label values black_tryhardp vallab105
tab V202303
codebook black_tryhardp

gen rr= black_nofavorsp+slavery_difficultp+black_deservep+black_tryhardp
tab rr
replace rr = rr/20


codebook V202304
gen elite_powerp = V202304
label variable elite_powerp "Our political system only works for insiders with money and power (post)"
replace elite_powerp=. if inrange(V202304, -9, -5)
replace elite_powerp=0 if V202304==1
replace elite_powerp=1 if V202304==2
replace elite_powerp=2 if V202304==3
replace elite_powerp=3 if V202304==4
replace elite_powerp=4 if V202304==5
label values elite_powerp vallab20
tab V202304
codebook elite_powerp

codebook V202305
gen elite_aheadp = V202305
label variable elite_aheadp "Because of rich and powerful it's difficult for the rest to get ahead (post)"
replace elite_aheadp=. if inrange(V202305, -9, -5)
replace elite_aheadp=0 if V202305==1
replace elite_aheadp=1 if V202305==2
replace elite_aheadp=2 if V202305==3
replace elite_aheadp=3 if V202305==4
replace elite_aheadp=4 if V202305==5
label values elite_aheadp vallab20
tab V202305
codebook elite_aheadp

codebook V202306
gen trust_expertsp = V202306
label variable trust_expertsp "Trust ordinary people or experts for public policy (post)"
replace trust_expertsp=. if inrange(V202306, -9, -5)
replace trust_expertsp=2 if V202306==3
replace trust_expertsp=3 if V202306==2
label define vallab134 1 "Trust ordinary people more" 2 "Trust both the same" 3 "Trust experts more"
label values trust_expertsp vallab134
codebook V202306
codebook trust_expertsp

codebook V202308x
gen trust_experts_sump = V202308x
label variable trust_experts_sump "Summary: trust ordinary people/experts for public policy (post)"
replace trust_experts_sump=. if inrange(V202308x, -7, -2)
label define vallab135 1 "Trust ordinary people much more" 2 "Trust ordinary people somewhat more" 3 "Trust both the same" 4 "Trust experts somewhat more" 5 "Trust experts much more"
label values trust_experts_sump vallab135
codebook V202308x
codebook trust_experts_sump

codebook V202309
gen expert_helpp = V202309
label variable expert_helpp "How much do people need help from experts to understand science (post)"
replace expert_helpp=. if inrange(V202309, -9, -5)
replace expert_helpp=0 if V202309==1
replace expert_helpp=1 if V202309==2
replace expert_helpp=2 if V202309==3
replace expert_helpp=3 if V202309==4
replace expert_helpp=4 if V202309==5
label values expert_helpp vallab58
codebook V202309
codebook expert_helpp

codebook V202310
gen science_coviddecp = V202310
label variable science_coviddecp "How importnat should science be for decisions about COVID-19 (post)"
replace science_coviddecp=. if inrange(V202310, -9, -5)
replace science_coviddecp=0 if V202310==1
replace science_coviddecp=1 if V202310==2
replace science_coviddecp=2 if V202310==3
replace science_coviddecp=3 if V202310==4
replace science_coviddecp=4 if V202310==5
label values science_coviddecp vallab30
codebook V202310
codebook science_coviddecp

codebook V202311
gen elite_controlp = V202311
label variable elite_controlp "Business and politics controlled by few powerful people (post)"
replace elite_controlp=. if inrange(V202311, -9, -5)
replace elite_controlp=0 if V202311==1
replace elite_controlp=1 if V202311==2
replace elite_controlp=2 if V202311==3
replace elite_controlp=3 if V202311==4
replace elite_controlp=4 if V202311==5
label values elite_controlp vallab20
tab V202311
codebook elite_controlp

codebook V202312
gen media_liesp = V202312
label variable media_liesp "Much of what people hear in schools and media are lies by those in power (post)"
replace media_liesp=. if inrange(V202312, -9, -5)
replace media_liesp=0 if V202312==1
replace media_liesp=1 if V202312==2
replace media_liesp=2 if V202312==3
replace media_liesp=3 if V202312==4
replace media_liesp=4 if V202312==5
label values media_liesp vallab20
tab V202312
codebook media_liesp

///If I should make dummies for these, let me know///
codebook V202313
gen post_mat1ap = V202313
label variable post_mat1ap "Post materialis most important 1A  (post)"
replace post_mat1ap=. if inrange(V202313, -9, -5)
label define vallab136 1 "A high level of economic growth" 2 "Making sure this country has strong defesne forces" 3 "Seeing that people have more say about how things are done at their jobs/in their communities" 4 "Trying to make our cities and countryside more beautifiul"
label values post_mat1ap vallab136
codebook V202313
codebook post_mat1ap

codebook V202314
gen post_mat1bp = V202314
label variable post_mat1bp "Post materilaism next most important 1B (post)"
replace post_mat1bp=. if inrange(V202314, -9, -5)
label values post_mat1bp vallab136
codebook V202314
codebook post_mat1bp

codebook V202315
gen post_mat2ap = V202315
label variable post_mat2ap "Post materialism most important 2A (post)"
replace post_mat2ap=. if inrange(V202315, -9, -5)
label define vallab137 1 "Maintaining order in the nation" 2 "Giving people more say in important government decisions" 3 "Fighting rising prices" 4 "Protecting freedom of speech"
label values post_mat2ap vallab137
codebook V202315
codebook post_mat2ap

codebook V202316
gen post_mat2bp = V202316
label variable post_mat2bp "Post materialism next most important 2B (post)"
replace post_mat2bp=. if inrange(V202316, -9, -5)
label values post_mat2bp vallab137
codebook V202316
codebook post_mat2bp

codebook V202317
gen get_aheadp = V202317
label variable get_aheadp "How much opportunity in America for average person to get ahead (post)"
replace get_aheadp=. if inrange(V202317, -9, -5)
replace get_aheadp=0 if V202317==5
replace get_aheadp=1 if V202317==4
replace get_aheadp=2 if V202317==3
replace get_aheadp=3 if V202317==2
replace get_aheadp=4 if V202317==1
label values get_aheadp vallab58
tab V202317
codebook get_aheadp

codebook V202318
gen econ_mobilp = V202318
label variable econ_mobilp "Economic mobility compared to 20 years ago (post)"
replace econ_mobilp=. if inrange(V202318, -9, -5)
replace econ_mobilp=1 if V202318==2
replace econ_mobilp=2 if V202318==3
replace econ_mobilp=3 if V202318==1
label values econ_mobilp vallab131
codebook V202318
codebook econ_mobilp

codebook V202320x
gen econ_mobil_sump = V202320x
label variable econ_mobil_sump "Summary: economic mobility (post)"
replace econ_mobil_sump=. if inrange(V202320x, -7, -2)
replace econ_mobil_sump=1 if V202320x==7
replace econ_mobil_sump=2 if V202320x==6
replace econ_mobil_sump=3 if V202320x==5
replace econ_mobil_sump=5 if V202320x==3
replace econ_mobil_sump=6 if V202320x==2
replace econ_mobil_sump=7 if V202320x==1
label values econ_mobil_sump vallab132
tab V202320x
codebook econ_mobil_sump

codebook V202321
gen reduce_deficitp = V202321
label variable reduce_deficitp "Importance of reducing defiict (post)"
replace reduce_deficitp=. if inrange(V202321, -9, -5)
replace reduce_deficitp=0 if V202321==5
replace reduce_deficitp=1 if V202321==4
replace reduce_deficitp=2 if V202321==3
replace reduce_deficitp=3 if V202321==2
replace reduce_deficitp=4 if V202321==1
label values reduce_deficitp vallab30
tab V202321
codebook reduce_deficitp

///Unsure how to code V202322-V202324///
codebook V202325
gen mill_taxp = V202325
label variable mill_taxp "Favor or oppose tax on millionaires (post)"
replace mill_taxp=. if inrange(V202325, -9, -5)
replace mill_taxp=1 if V202325==2
replace mill_taxp=2 if V202325==3
replace mill_taxp=3 if V202325==1
label values mill_taxp vallab60
codebook V202325
codebook mill_taxp

codebook V202326
gen aca_appp = V202326
label variable aca_appp "Approve or disapprove of the Affordable Care Act (post)"
replace aca_appp=. if inrange(V202326, -9, -5)
replace aca_appp=1 if V202326==2
replace aca_appp=2 if V202326==3
replace aca_appp=3 if V202326==1
label define vallab138 1 "Disapprove" 2 "Neither approve nor disapprove" 3 "Approve"
label values aca_appp vallab138
codebook V202326
codebook aca_appp

codebook V202328x
gen aca_app_sump = V202328x
label variable aca_app_sump "Summary: approve/disapprove Affordable Care Act (post)"
replace aca_app_sump=. if inrange(V202328x, -9, -5)
replace aca_app_sump=1 if V202328x==7
replace aca_app_sump=2 if V202328x==6
replace aca_app_sump=3 if V202328x==5
replace aca_app_sump=5 if V202328x==3
replace aca_app_sump=6 if V202328x==2
replace aca_app_sump=7 if V202328x==1
label define vallab139 1 "Disapprove a great deal" 2 "Disapprove a moderate amount" 3 "Disapprove a little" 4 "Neither approve nor disapprove" 5 "Approve a little" 6 "Approve a moderate amount" 7 "Approve a great deal"
label values aca_app_sump vallab139
tab V202328x
codebook aca_app_sump

codebook V202329
gen school_vaxp = V202329
label variable school_vaxp "Favor or oppose requiring vaccines in shcools (post)"
replace school_vaxp=. if inrange(V202329, -9, -5)
replace school_vaxp=1 if V202329==2
replace school_vaxp=2 if V202329==3
replace school_vaxp=3 if V202329==1
label values school_vaxp vallab60
codebook V202329
codebook school_vaxp

codebook V202331x
gen school_vax_sump = V202331x
label variable school_vax_sump "Favor/oppose requiring vaccines in schools (post)"
replace school_vax_sump=. if inrange(V202331x, -7, -2)
replace school_vax_sump=1 if V202331x==7
replace school_vax_sump=2 if V202331x==6
replace school_vax_sump=3 if V202331x==5
replace school_vax_sump=5 if V202331x==3
replace school_vax_sump=6 if V202331x==2
replace school_vax_sump=7 if V202331x==1
label values school_vax_sump vallab61
tab V202331x
codebook school_vax_sump

codebook V202332
gen climate_effectp = V202332
label variable climate_effectp "How much is climate change affecting severe weather/temperatures in US (post)"
replace climate_effectp=. if inrange(V202332, -9, -5)
replace climate_effectp=0 if V202332==1
replace climate_effectp=1 if V202332==2
replace climate_effectp=2 if V202332==3
replace climate_effectp=3 if V202332==4
replace climate_effectp=4 if V202332==5
label values climate_effectp vallab58
tab V202332
codebook climate_effectp

codebook V202333
gen climate_impp = V202333
label variable climate_impp "How important is issue of climate change to R (post)"
replace climate_impp=. if inrange(V202333, -9, -5)
replace climate_impp=0 if V202333==1
replace climate_impp=1 if V202333==2
replace climate_impp=2 if V202333==3
replace climate_impp=3 if V202333==4
replace climate_impp=4 if V202333==5
label values climate_impp vallab30
codebook V202333
codebook climate_impp

codebook V202334
gen climate_regp = V202334
label variable climate_regp "Favor or oppose increased regulation on greenhouse emissions (post)"
replace climate_regp=. if inrange(V202334, -9, -5)
replace climate_regp=1 if V202334==2
replace climate_regp=2 if V202334==3
replace climate_regp=3 if V202334==1
label values climate_regp vallab60
codebook V202334
codebook climate_regp

codebook V202336x
gen climate_reg_sump = V202336x
label variable climate_reg_sump "Summary: Favor/oppose increased regulation on greenhouse emissions (post)"
replace climate_reg_sump=. if inrange(V202336x, -7, -2)
replace climate_reg_sump=1 if V202336x==7
replace climate_reg_sump=2 if V202336x==6
replace climate_reg_sump=3 if V202336x==5
replace climate_reg_sump=5 if V202336x==3
replace climate_reg_sump=6 if V202336x==2
replace climate_reg_sump=7 if V202336x==1
label values climate_reg_sump vallab61
tab V202336x
codebook climate_reg_sump

codebook V202337
gen gun_buyp = V202337
label variable gun_buyp "Should federal government make it more difficult or easier to buy a gun (post)"
replace gun_buyp=. if inrange(V202337, -9, -5)
replace gun_buyp=2 if V202337==3
replace gun_buyp=3 if V202337==2
label values gun_buyp vallab131
codebook V202337
codebook gun_buyp

codebook V202338
gen gun_impp = V202338
label variable gun_impp "How important is issue of gun access to R (post)"
replace gun_impp=. if inrange(V202338, -9, -5)
replace gun_impp=0 if V202338==5
replace gun_impp=1 if V202338==4
replace gun_impp=2 if V202338==3
replace gun_impp=3 if V202338==2
replace gun_impp=4 if V202338==1
label values gun_impp vallab30
codebook V202338
codebook gun_impp

codebook V202339
gen back_checkp = V202339
label variable back_checkp "Favor or oppose background checks for gun purchases (post)"
replace back_checkp=. if inrange(V202339, -9, -5)
replace back_checkp=1 if V202339==2
replace back_checkp=2 if V202339==3
replace back_checkp=3 if V202339==1
label values back_checkp vallab60
codebook V202339
codebook back_checkp

codebook V202341x
gen back_check_sump = V202341x
label variable back_check_sump "Summary: Favor/oppose background checks for gun purchases (post)"
replace back_check_sump=. if inrange(V202341x, -7, -2)
replace back_check_sump=1 if V202341x==7
replace back_check_sump=2 if V202341x==6
replace back_check_sump=3 if V202341x==5
replace back_check_sump=5 if V202341x==3
replace back_check_sump=6 if V202341x==2
replace back_check_sump=7 if V202341x==1
label values back_check_sump vallab61
tab V202341x
codebook back_check_sump

codebook V202342
gen ar_banp = V202342
label variable ar_banp "Favor or oppose banning 'assult-style' rifles (post)"
replace ar_banp=. if inrange(V202342, -9, -5)
replace ar_banp=1 if V202342==2
replace ar_banp=2 if V202342==3
replace ar_banp=3 if V202342==1
label values ar_banp vallab60
codebook V202342
codebook ar_banp

codebook V202344x
gen ar_ban_sump = V202344x
label variable ar_ban_sump "Summary: favor/oppose banning 'assault-style' rifles (post)"
replace ar_ban_sump=. if inrange(V202344x, -7, -2)
replace ar_ban_sump=1 if V202344x==7
replace ar_ban_sump=2 if V202344x==6
replace ar_ban_sump=3 if V202344x==5
replace ar_ban_sump=5 if V202344x==3
replace ar_ban_sump=6 if V202344x==2
replace ar_ban_sump=7 if V202344x==1
label values ar_ban_sump vallab61
tab V202344x
codebook ar_ban_sump

codebook V202345
gen buybackp = V202345
label variable buybackp "Favor or oppose mandatory buy back of 'assault style' rifles (post)"
replace buybackp=. if inrange(V202345, -9, -5)
replace buybackp=1 if V202345==2
replace buybackp=2 if V202345==3
replace buybackp=3 if V202345==1
label values buybackp vallab60
codebook V202345
codebook buybackp

codebook V202347x
gen buyback_sump = V202347x
label variable buyback_sump "Summary: favor/oppose mandatory buy back of 'assault style' rifles (post)"
replace buyback_sump=. if inrange(V202347x, -7, -2)
replace buyback_sump=1 if V202347x==7
replace buyback_sump=2 if V202347x==6
replace buyback_sump=3 if V202347x==5
replace buyback_sump=5 if V202347x==3
replace buyback_sump=6 if V202347x==2
replace buyback_sump=7 if V202347x==1
label values buyback_sump vallab61
tab V202347x
codebook buyback_sump

codebook V202348
gen opioid_regp = V202348
label variable opioid_regp "Should government do more or less about opiod drug addiction (post)"
replace opioid_regp=. if inrange(V202348, -9, -5)
replace opioid_regp=1 if V202348==2
replace opioid_regp=2 if V202348==3
replace opioid_regp=3 if V202348==1
label values opioid_regp vallab47
codebook V202348
codebook opioid_regp

codebook V202350x
gen opioid_reg_sump = V202350x
label variable opioid_reg_sump "Summary: Shoudl federal government do more/less about opioid drug addiction (post)"
replace opioid_reg_sump=. if inrange(V202350x, -7, -2)
replace opioid_reg_sump=1 if V202350x==7
replace opioid_reg_sump=2 if V202350x==6
replace opioid_reg_sump=3 if V202350x==5
replace opioid_reg_sump=5 if V202350x==3
replace opioid_reg_sump=6 if V202350x==2
replace opioid_reg_sump=7 if V202350x==1
label values opioid_reg_sump vallab128
tab V202350x
codebook opioid_reg_sump

codebook V202351
gen excess_forcep = V202351
label variable excess_forcep "How often do police officers use more force than necessary (post)"
replace excess_forcep=. if inrange(V202351, -9, -5)
replace excess_forcep=0 if V202351==1
replace excess_forcep=1 if V202351==2
replace excess_forcep=2 if V202351==3
replace excess_forcep=3 if V202351==4
replace excess_forcep=4 if V202351==5
label define vallab140 0 "Never" 1 "Rarely" 2 "About half the time" 3 "Most of the time" 4 "All the time"
label values excess_forcep vallab140
tab V202351
codebook excess_forcep

codebook V202352
gen r_classp = V202352
label variable r_classp "How would R describe social class (post)"
replace r_classp=. if inrange(V202352, -9, -5)
label define vallab141 1 "Lower class" 2 "Working class" 3 "Middle class" 4 "Upper class"
label values r_classp vallab141
codebook V202352
codebook r_classp

codebook V202353
gen r_midclassp = V202353
label variable r_midclassp "Is R lower middle class, middle class, or upper middle class (post)"
replace r_midclassp=. if inrange(V202353, -9, -1)
label define vallab142 1 "Lower middle class" 2 "Middle class" 3 "Upper middle class"
label values r_midclassp vallab142
codebook V202353
codebook r_midclassp

codebook V202354
gen news_langp = V202354
label variable news_langp "If R is Hispanic, does R get news in Spanish or English (post)"
replace news_langp=. if inrange(V202354, -9, -1)
replace news_langp=1 if V202354==2
replace news_langp=2 if V202354==3
replace news_langp=3 if V202354==1
label define vallab143 1 "Spanish More" 2 "Both equally (bilingual)" 3 "English more"
label values news_langp vallab143
codebook V202354
codebook news_langp

codebook V202355
gen live_areap = V202355
label variable live_areap "Does R currently live in a rural or urban area (post)"
replace live_areap=. if inrange(V202355, -9, -5)
label define vallab144 1 "Rural" 2 "Small town" 3 "Suburb" 4 "City"
label values live_areap vallab144
codebook V202355
codebook live_areap

codebook V202356
gen area_personp = V202356
label variable area_personp "Does R usually think of self as a rural or urban person (post)"
replace area_personp=. if inrange(V202356, -9, -5) | V202356==5
///I put other under missing///
replace area_personp=1 if V202356==4
replace area_personp=2 if V202356==3
replace area_personp=3 if V202356==2
replace area_personp=4 if V202356==1
label values area_personp vallab144
tab V202356
codebook area_personp

codebook V202357
gen areaid_impp = V202357
label variable areaid_impp "How important is urban or rural to R's identity (post)"
replace areaid_impp=. if inrange(V202357, -9, -1)
replace areaid_impp=0 if V202357==1
replace areaid_impp=1 if V202357==2
replace areaid_impp=2 if V202357==3
replace areaid_impp=3 if V202357==4
replace areaid_impp=4 if V202357==5
label values areaid_impp vallab30
tab V202357
codebook areaid_impp

codebook V202358
gen terrorist_worryp = V202358
label variable terrorist_worryp "How worried about terrorist attack in near future (post)"
replace terrorist_worryp=. if inrange(V202358, -9, -5)
replace terrorist_worryp=0 if V202358==5
replace terrorist_worryp=1 if V202358==4
replace terrorist_worryp=2 if V202358==3
replace terrorist_worryp=3 if V202358==2
replace terrorist_worryp=4 if V202358==1
label values terrorist_worryp vallab48
tab V202358
codebook terrorist_worryp

codebook V202359
gen freetrade_agmtp = V202359
label variable freetrade_agmtp "Favor or oppose free trade agreements with other countries (post)"
replace freetrade_agmtp=. if inrange(V202359, -9, -5)
replace freetrade_agmtp=1 if V202359==2
replace freetrade_agmtp=2 if V202359==3
replace freetrade_agmtp=3 if V202359==1
label values freetrade_agmtp vallab60
codebook V202359
codebook freetrade_agmtp

codebook V202361x
gen freetrade_agmt_sump = V202361x
label variable freetrade_agmt_sump "Favor/oppose free trade agreements (post)"
replace freetrade_agmt_sump=. if inrange(V202361x, -7, -2)
replace freetrade_agmt_sump=1 if V202361x==7
replace freetrade_agmt_sump=2 if V202361x==6
replace freetrade_agmt_sump=3 if V202361x==5
replace freetrade_agmt_sump=5 if V202361x==3
replace freetrade_agmt_sump=6 if V202361x==2
replace freetrade_agmt_sump=7 if V202361x==1
label values freetrade_agmt_sump vallab61
tab V202361x
codebook freetrade_agmt_sump

codebook V202362
gen trade_relationp = V202362
label variable trade_relationp "Is increasing trade good or bad for international relationships (post)"
replace trade_relationp=. if inrange(V202362, -9, -5)
replace trade_relationp=1 if V202362==2
replace trade_relationp=2 if V202362==3
replace trade_relationp=3 if V202362==1
label define vallab145 1 "Bad" 2 "Neither good nor bad" 3 "Good"
label values trade_relationp vallab145
codebook V202362
codebook trade_relationp

codebook V202364x
gen trade_relation_sump = V202364x
label variable trade_relation_sump "Summary: increasing trade good/bad for international relationships (post)"
replace trade_relation_sump=. if inrange(V202364x, -7, -2)
replace trade_relation_sump=1 if V202364x==5
replace trade_relation_sump=2 if V202364x==4
replace trade_relation_sump=4 if V202364x==2
replace trade_relation_sump=5 if V202364x==1
label values trade_relation_sump vallab44
tab V202364x
codebook trade_relation_sump

codebook V202365
gen trade_jobsp = V202365
label variable trade_jobsp "Has international trade increased or decreased jobs in US (post)"
replace trade_jobsp=. if inrange(V202365, -9, -5)
replace trade_jobsp=1 if V202365==2
replace trade_jobsp=2 if V202365==3
replace trade_jobsp=3 if V202365==1
label values trade_jobsp vallab124
codebook V202365
codebook trade_jobsp

codebook V202367x
gen trade_jobs_sump = V202367x
label variable trade_jobs_sump "Summary: international trade increased/decreased jobs in US (post)"
replace trade_jobs_sump=. if inrange(V202367x, -7, -2)
replace trade_jobs_sump=1 if V202367x==5
replace trade_jobs_sump=2 if V202367x==4
replace trade_jobs_sump=4 if V202367x==2
replace trade_jobs_sump=5 if V202367x==1
label values trade_jobs_sump vallab43
codebook V202367x
codebook trade_jobs_sump

codebook V202368
gen trade_jobsabroadp = V202368
label variable trade_jobsabroadp "Has international trade increased or decreased jobs abroad (post)"
replace trade_jobsabroadp=. if inrange(V202368, -9, -5)
replace trade_jobsabroadp=1 if V202368==2
replace trade_jobsabroadp=2 if V202368==3
replace trade_jobsabroadp=3 if V202368==1
label values trade_jobsabroadp vallab124
codebook V202368
codebook trade_jobsabroadp

codebook V202370x
gen trade_jobsabroad_sump = V202370x
label variable trade_jobsabroad_sump "Summary: international trade increased/decreased jobs abroad (post)"
replace trade_jobsabroad_sump=. if inrange(V202370x, -7, -2)
replace trade_jobsabroad_sump=1 if V202370x==5
replace trade_jobsabroad_sump=2 if V202370x==4
replace trade_jobsabroad_sump=4 if V202370x==2
replace trade_jobsabroad_sump=5 if V202370x==1
label values trade_jobsabroad_sump vallab43
codebook V202370x
codebook trade_jobsabroad_sump

codebook V202371
gen div_incp = V202371
label variable div_incp "Does increasing diversity made US better or worse place to live (post)"
replace div_incp=. if inrange(V202371, -9, -5)
replace div_incp=1 if V202371==2
replace div_incp=2 if V202371==3
replace div_incp=3 if V202371==1
label values div_incp vallab45
codebook V202371
codebook div_incp

codebook V202373x
gen div_inc_sump = V202373x
label variable div_inc_sump "Summary: increasing diversity made US betterworse place to live (post)"
replace div_inc_sump=. if inrange(V202373x, -7, -2)
replace div_inc_sump=1 if V202373x==5
replace div_inc_sump=2 if V202373x==4
replace div_inc_sump=4 if V202373x==2
replace div_inc_sump=5 if V202373x==1
label define vallab146 1 "A lot worse" 2 "A little worse" 3 "Makes no difference" 4 "A little better" 5 "A lot better"
label values div_inc_sump vallab146
codebook V202373x
codebook div_inc_sump

codebook V202374
gen ubip = V202374
label variable ubip "Favor or oppose federal program giving all citizens $12K/year (post)"
replace ubip=. if inrange(V202374, -9, -5)
replace ubip=1 if V202374==2
replace ubip=2 if V202374==3
replace ubip=3 if V202374==1
label values ubip vallab60
codebook V202374
codebook ubip

codebook V202376x
gen ubi_sump = V202376x
label variable ubi_sump "Summary: favor/oppose federal program giving citizens $12K/year (post)"
replace ubi_sump=. if inrange(V202376x, -7, -2)
replace ubi_sump=1 if V202376x==7
replace ubi_sump=2 if V202376x==6
replace ubi_sump=3 if V202376x==5
replace ubi_sump=5 if V202376x==3
replace ubi_sump=6 if V202376x==2
replace ubi_sump=7 if V202376x==1
label values ubi_sump vallab61
tab V202376x
codebook ubi_sump

codebook V202377
gen min_wagep = V202377
label variable min_wagep "Should the minimum wage be raised, kept the same, or lowered (post)"
replace min_wagep=. if inrange(V202377, -9, -5)
replace min_wagep=1 if V202377==4
replace min_wagep=2 if V202377==3
replace min_wagep=3 if V202377==2
replace min_wagep=4 if V202377==1
label define vallab147 1 "Eliminated" 2 "Lowered" 3 "Kept the same" 4 "Raised"
label values min_wagep vallab147
codebook V202377
codebook min_wagep

codebook V202378
gen gov_hlth_helpp = V202378
label variable gov_hlth_helpp "Increase/decrease government spending to help peole pay for healthcare (post)"
replace gov_hlth_helpp=. if inrange(V202378, -9, -5)
replace gov_hlth_helpp=1 if V202378==2
replace gov_hlth_helpp=2 if V202378==3
replace gov_hlth_helpp=3 if V202378==1
label define vallab148 1 "Decrease" 2 "No change" 3 "Increase"
label values gov_hlth_helpp vallab148
codebook V202378
codebook gov_hlth_helpp

codebook V202380x
gen gov_hlth_help_sump = V202380x
label variable gov_hlth_help_sump "Summary: Increase/decrease government spending to help pay for healthcare (post)"
replace gov_hlth_help_sump=. if inrange(V202380x, -7, -2)
replace gov_hlth_help_sump=1 if V202380x==7
replace gov_hlth_help_sump=2 if V202380x==6
replace gov_hlth_help_sump=3 if V202380x==5
replace gov_hlth_help_sump=5 if V202380x==3
replace gov_hlth_help_sump=6 if V202380x==2
replace gov_hlth_help_sump=7 if V202380x==1
label define vallab149 1 "Decrease a great deal" 2 "Decrease a moderate amount" 3 "Decrease a little" 4 "No change" 5 "Increase a little" 6 "Increase a moderate amount" 7 "Increase a great deal"
label values gov_hlth_help_sump vallab149 
tab V202380x
codebook gov_hlth_help_sump

codebook V202381
gen vax_benefitp = V202381
label variable vax_benefitp "Do health benefits of vaccines outweigh the risks (post)"
replace vax_benefitp=. if inrange(V202381, -9, -5)
replace vax_benefitp=1 if V202381==2
replace vax_benefitp=2 if V202381==3
replace vax_benefitp=3 if V202381==1
label define vallab150 1 "Risks outweigh benefits" 2 "No difference" 3 "Benefits outweigh risks"
label values vax_benefitp vallab150
codebook V202381
codebook vax_benefitp

codebook V202383x
gen vax_benefit_sump = V202383x
label variable vax_benefit_sump "Summary: Health benefits of vaccinations outweigh risks"
replace vax_benefit_sump=. if inrange(V202383x, -7, -2)
replace vax_benefit_sump=1 if V202383x==7
replace vax_benefit_sump=2 if V202383x==6
replace vax_benefit_sump=3 if V202383x==5
replace vax_benefit_sump=5 if V202383x==3
replace vax_benefit_sump=6 if V202383x==2
replace vax_benefit_sump=7 if V202383x==1
label define vallab151 1 "Risks much greater than health benefits" 2 "Risks moderately greater than health benefits" 3 "Risks slightly greater than health benefits" 4 "No difference" 5 "Health benefits slightly greater than risks" 6 "Health benefits moderately greater than risks" 7 "Health benefits much greater than risks"
label values vax_benefit_sump vallab151
tab V202383x
codebook vax_benefit_sump

codebook V202384
gen harrass_attnp = V202384
label variable harrass_attnp "Attention to sexual harrassment has gone too far or not far enough (post)"
replace harrass_attnp=. if inrange(V202384, -9, -5)
replace harrass_attnp=1 if V202384==2
replace harrass_attnp=2 if V202384==3
replace harrass_attnp=3 if V202384==1
label define vallab152 1 "Has not gone far enough" 2 "Has been about right" 3 "Has gone too far"
label values harrass_attnp vallab152
codebook V202384
codebook harrass_attnp

codebook V202387x
gen harrass_attn_sump = V202387x
label variable harrass_attn_sump "Attention to sexual harrassment has gone too far/not far enough (post)"
replace harrass_attn_sump=. if inrange(V202387x, -7, -2)
replace harrass_attn_sump=1 if V202387x==5
replace harrass_attn_sump=2 if V202387x==4
replace harrass_attn_sump=4 if V202387x==2
replace harrass_attn_sump=5 if V202387x==1
label define vallab153 1 "Has not gone nearly far enough" 2 "Has not gone quite far enough" 3 "Has been about right" 4 "Has gone a little too far" 5 "Has gone much too far"
label values harrass_attn_sump vallab153
codebook V202387x
codebook harrass_attn_sump

codebook V202388
gen trans_militaryp = V202388
label variable trans_militaryp "Favor/oppose allowing transgender people to serve in military (post)"
replace trans_militaryp=. if inrange(V202388, -9, -5)
replace trans_militaryp=1 if V202388==2
replace trans_militaryp=2 if V202388==3
replace trans_militaryp=3 if V202388==1
label values trans_militaryp vallab60
codebook V202388
codebook trans_militaryp

codebook V202390x
gen trans_military_sump = V202390x
label variable trans_military_sump "Summary: favor/oppose transgender people serve in military (post)"
replace trans_military_sump=. if inrange(V202390x, -7, -2)
replace trans_military_sump=1 if V202390x==7
replace trans_military_sump=2 if V202390x==6
replace trans_military_sump=3 if V202390x==5
replace trans_military_sump=5 if V202390x==3
replace trans_military_sump=6 if V202390x==2
replace trans_military_sump=7 if V202390x==1
label values trans_military_sump vallab61
tab V202390x
codebook trans_military_sump

codebook V202400
gen china_threatp = V202400
label variable china_threatp "How much is China a threat to the United States (post)"
replace china_threatp=. if inrange(V202400, -9, -4)
replace china_threatp=0 if V202400==1
replace china_threatp=1 if V202400==2
replace china_threatp=2 if V202400==3
replace china_threatp=3 if V202400==4
replace china_threatp=4 if V202400==5
label values china_threatp vallab58
tab V202400
codebook china_threatp

codebook V202401
gen russia_threatp = V202401
label variable russia_threatp "How much is Russia a threat to the United States (post)"
replace russia_threatp=. if inrange(V202401, -9, -4)
replace russia_threatp=0 if V202401==1
replace russia_threatp=1 if V202401==2
replace russia_threatp=2 if V202401==3
replace russia_threatp=3 if V202401==4
replace russia_threatp=4 if V202401==5
label values russia_threatp vallab58
tab V202401
codebook russia_threatp

codebook V202402
gen mexico_threatp = V202402
label variable mexico_threatp "How much is Mexico a threat to the United States (post)"
replace mexico_threatp=. if inrange(V202402, -9, -4)
replace mexico_threatp=0 if V202402==1
replace mexico_threatp=1 if V202402==2
replace mexico_threatp=2 if V202402==3
replace mexico_threatp=3 if V202402==4
replace mexico_threatp=4 if V202402==5
label values mexico_threatp vallab58
tab V202402
codebook mexico_threatp

codebook V202403
gen iran_threatp = V202403
label variable iran_threatp "How much is Iran a threat to the United States (post)"
replace iran_threatp=. if inrange(V202403, -9, -5)
replace iran_threatp=0 if V202403==1
replace iran_threatp=1 if V202403==2
replace iran_threatp=2 if V202403==3
replace iran_threatp=3 if V202403==4
replace iran_threatp=4 if V202403==5
label values iran_threatp vallab58
tab V202403
codebook iran_threatp

codebook V202404
gen japan_threatp = V202404
label variable japan_threatp "How much is Japan a threat to the United States (post)"
replace japan_threatp=. if inrange(V202404, -9, -5)
replace japan_threatp=0 if V202404==1
replace japan_threatp=1 if V202404==2
replace japan_threatp=2 if V202404==3
replace japan_threatp=3 if V202404==4
replace japan_threatp=4 if V202404==5
label values japan_threatp vallab58
tab V202404
codebook japan_threatp

codebook V202405
gen germany_threatp = V202405
label variable germany_threatp "How much is Germany a threat to the United States (post)"
replace germany_threatp=. if inrange(V202405, -9, -5)
replace germany_threatp=0 if V202405==1
replace germany_threatp=1 if V202405==2
replace germany_threatp=2 if V202405==3
replace germany_threatp=3 if V202405==4
replace germany_threatp=4 if V202405==5
label values germany_threatp vallab58
tab V202405
codebook germany_threatp

codebook V202406
gen pol_interestp = V202406
label variable pol_interestp "How interested in politics is R (post)"
replace pol_interestp=. if inrange(V202406, -9, -5)
replace pol_interestp=0 if V202406==4
replace pol_interestp=1 if V202406==3
replace pol_interestp=3 if V202406==1
label define vallab154 0 "Not at all" 1 "Not very" 2 "Somewhat" 3 "Very"
label values pol_interestp vallab154
codebook V202406
codebook pol_interestp

codebook V202407
gen follow_polp = V202407
label variable follow_polp "How closely does R follow politics in media (post)"
replace follow_polp=. if inrange(V202407, -9, -5)
replace follow_polp=0 if V202407==4
replace follow_polp=1 if V202407==3
replace follow_polp=3 if V202407==1
label values follow_polp vallab154
codebook V202407
codebook follow_polp

codebook V202408
gen understand_polp = V202408
label variable understand_polp "Agree/disagree: R understands most important political issues (post)"
replace understand_polp=. if inrange(V202408, -9, -5)
replace understand_polp=1 if V202408==5
replace understand_polp=2 if V202408==4
replace understand_polp=4 if V202408==2
replace understand_polp=5 if V202408==1
label values understand_polp vallab105
tab V202408
codebook understand_polp

codebook V202409
gen compromise_badp = V202409
label variable compromise_badp "Attitudes about elites: compromise in politics is selling out (post)"
replace compromise_badp=. if inrange(V202409, -9, -5)
replace compromise_badp=1 if V202409==5
replace compromise_badp=2 if V202409==4
replace compromise_badp=4 if V202409==2
replace compromise_badp=5 if V202409==1
label values compromise_badp vallab105
tab V202409
codebook compromise_badp

codebook V202410
gen pol_carep = V202410
label variable pol_carep "Attitudes about elites: politicians do not care about people (post)"
replace pol_carep=. if inrange(V202410, -9, -5)
replace pol_carep=1 if V202410==5
replace pol_carep=2 if V202410==4
replace pol_carep=4 if V202410==2
replace pol_carep=5 if V202410==1
label values pol_carep vallab105
tab V202410
codebook pol_carep

codebook V202411
gen pol_trustp = V202411
label variable pol_trustp "Attitudes about elites: most politicians are trustworthy (post)"
replace pol_trustp=. if inrange(V202411, -9, -5)
replace pol_trustp=1 if V202411==5
replace pol_trustp=2 if V202411==4
replace pol_trustp=4 if V202411==2
replace pol_trustp=5 if V202411==1
label values pol_trustp vallab105
tab V202411
codebook pol_trustp

codebook V202412
gen pol_probp = V202412
label variable pol_probp "Attitudes about elites: politicians are the main problem in the US (post)"
replace pol_probp=. if inrange(V202412, -9, -5)
replace pol_probp=1 if V202412==5
replace pol_probp=2 if V202412==4
replace pol_probp=4 if V202412==2
replace pol_probp=5 if V202412==1
label values pol_probp vallab105
codebook V202412
codebook pol_probp

codebook V202413
gen strong_leadp = V202413
label variable strong_leadp "Attitudes about elites: strong leader in government is good (post)"
replace strong_leadp=. if inrange(V202413, -9, -5)
replace strong_leadp=1 if V202413==5
replace strong_leadp=2 if V202413==4
replace strong_leadp=4 if V202413==2
replace strong_leadp=5 if V202413==1
label values strong_leadp vallab105
tab V202413
codebook strong_leadp

codebook V202414
gen ppl_policyp = V202414
label variable ppl_policyp "Attitudes about elites: people should make policy decisions (post)"
replace ppl_policyp=. if inrange(V202414, -9, -5)
replace ppl_policyp=1 if V202414==5
replace ppl_policyp=2 if V202414==4
replace ppl_policyp=4 if V202414==2
replace ppl_policyp=5 if V202414==1
label values ppl_policyp vallab105
tab V202414
codebook ppl_policyp

codebook V202415
gen pol_richp = V202415
label variable pol_richp "Attitudes about elites: politicians only care about the rich (post)"
replace pol_richp=. if inrange(V202415, -9, -5)
replace pol_richp=1 if V202415==5
replace pol_richp=2 if V202415==4
replace pol_richp=4 if V202415==2
replace pol_richp=5 if V202415==1
label values pol_richp vallab105
tab V202415
codebook pol_richp

codebook V202416
gen min_adaptp = V202416
label variable min_adaptp "Out-group attitudes: minorities should adapt (post)"
replace min_adaptp=. if inrange(V202416, -9, -5)
replace min_adaptp=1 if V202416==5
replace min_adaptp=2 if V202416==4
replace min_adaptp=4 if V202416==2
replace min_adaptp=5 if V202416==1
label values min_adaptp vallab105
tab V202416
codebook min_adaptp

codebook V202417
gen maj_willp = V202417
label variable maj_willp "Out-group attitudes: will of majority should always prevail (post)"
replace maj_willp=. if inrange(V202417, -9, -5)
replace maj_willp=1 if V202417==5
replace maj_willp=2 if V202417==4
replace maj_willp=4 if V202417==2
replace maj_willp=5 if V202417==1
label values maj_willp vallab105
tab V202417
codebook maj_willp

codebook V202418
gen imm_econp = V202418
label variable imm_econp "Out_group attitutes: immigrants good for America's economy (post)"
replace imm_econp=. if inrange(V202418, -9, -5)
replace imm_econp=1 if V202418==5
replace imm_econp=2 if V202418==4
replace imm_econp=4 if V202418==2
replace imm_econp=5 if V202418==1
label values imm_econp vallab105
tab V202418
codebook imm_econp

codebook V202419
gen imm_culturep = V202419
label variable imm_culturep "Out-group attitudes: America's culture harmed by immigrants (post)"
replace imm_culturep=. if inrange(V202419, -9, -5)
replace imm_culturep=1 if V202419==5
replace imm_culturep=2 if V202419==4
replace imm_culturep=4 if V202419==2
replace imm_culturep=5 if V202419==1
label values imm_culturep vallab105
tab V202419
codebook imm_culturep

codebook V202420
gen imm_crimep = V202420
label variable imm_crimep "Out-group attitudes: immigrants increase crime rates in US (post)"
replace imm_crimep=. if inrange(V202420, -9, -5)
replace imm_crimep=1 if V202420==5
replace imm_crimep=2 if V202420==4
replace imm_crimep=4 if V202420==2
replace imm_crimep=5 if V202420==1
label values imm_crimep vallab105
tab V202420
codebook imm_crimep

codebook V202421
gen amer_bornp = V202421
label variable amer_bornp "National identity: how importnat to have been born in US (post)"
replace amer_bornp=. if inrange(V202421, -9, -5)
replace amer_bornp=0 if V202421==4
replace amer_bornp=1 if V202421==3
replace amer_bornp=3 if V202421==1
label define vallab155 0 "Not at all" 1 "Not very" 2 "Fairly" 3 "Very"
label values amer_bornp vallab155
codebook V202421
codebook amer_bornp

codebook V202422
gen amer_ancestryp = V202422
label variable amer_ancestryp "National identity: how important to have American ancestry (post)"
replace amer_ancestryp=. if inrange(V202422, -9, -5)
replace amer_ancestryp=0 if V202422==4
replace amer_ancestryp=1 if V202422==3
replace amer_ancestryp=3 if V202422==1
label values amer_ancestry vallab155
codebook V202422
codebook amer_ancestryp

codebook V202423
gen amer_engp = V202423
label variable amer_engp "National identity: how importnat to be able to speak English (post)"
replace amer_engp=. if inrange(V202423, -9, -5)
replace amer_engp=0 if V202423==4
replace amer_engp=1 if V202423==3
replace amer_engp=3 if V202423==1
label values amer_engp vallab155
codebook V202423
codebook amer_engp

codebook V202424
gen amer_customp = V202424
label variable amer_customp "National Identity: how importnat to follow America's customs (post)"
replace amer_customp=. if inrange(V202424, -9, -5)
replace amer_customp=0 if V202424==4
replace amer_customp=1 if V202424==3
replace amer_customp=3 if V202424==1
label values amer_customp vallab155
codebook V202424
codebook amer_customp

codebook V202425
gen pol_corruptp = V202425
label variable pol_corruptp "How widespread is corruption among politicians in US (post)"
replace pol_corruptp=. if inrange(V202425, -9, -5)
replace pol_corruptp=1 if V202425==4
replace pol_corruptp=2 if V202425==3
replace pol_corruptp=3 if V202425==2
replace pol_corruptp=4 if V202425==1
label define vallab156 1 "Very widespread" 2 "Quite widespread" 3 "Not very widespread" 4 "Hardly happens at all"
label values pol_corruptp vallab156
codebook V202425
codebook pol_corruptp

codebook V202426
gen reduce_incdiffp = V202426
label variable reduce_incdiffp "Government should reduce differences in income levels (post)"
replace reduce_incdiffp=. if inrange(V202426, -9, -5)
replace reduce_incdiffp=1 if V202426==5
replace reduce_incdiffp=2 if V202426==4
replace reduce_incdiffp=4 if V202426==2
replace reduce_incdiffp=5 if V202426==1
label values reduce_incdiffp vallab105
codebook V202426
codebook reduce_incdiffp

codebook V202427
gen gov_perfp = V202427
label variable gov_perfp "How good/bad a job has government done in last 4 years (post)"
replace gov_perfp=. if inrange(V202427, -9, -5)
replace gov_perfp=1 if V202427==4
replace gov_perfp=2 if V202427==3
replace gov_perfp=3 if V202427==2
replace gov_perfp=4 if V202427==1
label define vallab157 1 "Very bad job" 2 "Bad job" 3 "Good job" 4 "Very good job"
label values gov_perfp vallab157
codebook V202427
codebook gov_perfp

codebook V202428
gen party_viewp = V202428
label variable party_viewp "Is there a praty that represents R's views dummy (post)"
replace party_viewp=. if inrange(V202428, -9, -5)
replace party_viewp=0 if V202428==2
label values party_viewp vallab1
codebook V202428
codebook party_viewp

codebook V202429
gen dem_viewp = V202429
label variable dem_viewp "Democratic Party represents R's views best dummy (post)"
replace dem_viewp=. if inrange(V202429, -9, -1)
replace dem_viewp=0 if V202429==5 | V202429==7
label values dem_viewp vallab1
codebook V202429
codebook dem_viewp

gen rep_viewp = V202429
label variable rep_viewp "Republican Party respresents R's views best dummy (post)"
replace rep_viewp=. if inrange(V202429, -9, -1)
replace rep_viewp=0 if V202429==1 | V202429==7
replace rep_viewp=1 if V202429==5
label values rep_viewp vallab1
codebook V202429
codebook rep_viewp

codebook V202430
gen econ_statep = V202430
label variable econ_statep "State of economy better or worse over past 12 months (post)"
replace econ_statep=. if inrange(V202430, -9, -5)
replace econ_statep=1 if V202430==5
replace econ_statep=2 if V202430==4
replace econ_statep=4 if V202430==2
replace econ_statep=5 if V202430==1
label define vallab158 1 "Gotten much worse" 2 "Gotten somewhat worse" 3 "Stayed about the same" 4 "Gotten somewhat better" 5 "Gotten much better"
label values econ_statep vallab158
tab V202430
codebook econ_statep

codebook V202431
gen diff_powerp = V202431
label variable diff_powerp "5t scale: Does it make a difference who is in power (post)"
replace diff_powerp=. if inrange(V202431, -9, -5)
replace diff_powerp=0 if V202431==1
replace diff_powerp=1 if V202431==2
replace diff_powerp=2 if V202431==3
replace diff_powerp=3 if V202431==4
replace diff_powerp=4 if V202431==5
label define vallab159 0 "It doesn't make any difference" 4 "It makes a big difference"
label values diff_powerp vallab159
codebook V202431
codebook diff_powerp

codebook V202432
gen vote_diffp = V202432
label variable vote_diffp "Who people vote for makes a big difference (post)"
replace vote_diffp=. if inrange(V202432, -9, -5)
replace vote_diffp=0 if V202432==1
replace vote_diffp=1 if V202432==2
replace vote_diffp=2 if V202432==3
replace vote_diffp=3 if V202432==4
replace vote_diffp=4 if V202432==5
label values vote_diffp vallab159
codebook V202432
codebook vote_diffp

codebook V202433
gen ld_demp = V202433
label variable ld_demp "Like-dislike: Democratic Party (post)"
replace ld_demp=. if inrange(V202433, -9, -5)
label define vallab160 0 "Strongly dislike" 10 "Strongly like"
label values ld_demp vallab160
tab V202433
tab ld_demp

codebook V202434
gen ld_repp = V202434
label variable ld_repp "Like-dislike: Republican Party (post)"
replace ld_repp=. if inrange(V202434, -9, -5)
label values ld_repp vallab160
tab V202434
tab ld_repp

codebook V202435
gen ld_bidenp = V202435
label variable ld_bidenp "Like-dislike: Democratic Presidential Candidate (post)"
replace ld_bidenp=. if inrange(V202435, -9, -1)
label values ld_bidenp vallab160
tab V202435
tab ld_bidenp

codebook V202436
gen ld_trumpp = V202436
label variable ld_trumpp "Like-dislike: Republican Presidential candidate (post)"
replace ld_trumpp=. if inrange(V202436, -9, -5)
label values ld_trumpp vallab160
tab V202436
tab ld_trumpp

codebook V202437
gen lr_demp = V202437
label variable lr_demp "Left-right: Democratic party (post)"
replace lr_demp=. if inrange(V202437, -9, -5)
label define vallab161 0 "Left" 10 "Right"
label values lr_demp vallab161
tab V202437
tab lr_demp

codebook V202438
gen lr_repp = V202438
label variable lr_repp "Left-right: Republican party (post)"
replace lr_repp=. if inrange(V202438, -9, -5)
label values lr_repp vallab161
tab V202438
tab lr_repp

codebook V202439
gen lr_selfp = V202439
label variable lr_selfp "Left-right: self (post)"
replace lr_selfp=. if inrange(V202439, -9, -5)
label values lr_selfp vallab161
tab V202439
tab lr_selfp

codebook V202440
gen dem_satisp = V202440
label variable dem_satisp "Satisfaction with the democratic process (post)"
replace dem_satisp=. if inrange(V202440, -9, -5)
replace dem_satisp=0 if V202440==5
replace dem_satisp=1 if V202440==4
replace dem_satisp=3 if V202440==1
label values dem_satisp vallab155
codebook V202440
codebook dem_satisp

codebook V202441
gen party_closep = V202441
label variable party_closep "Is R close to any political party dummy (post)"
replace party_closep=. if inrange(V202441, -9, -5)
replace party_closep=0 if V202441==5
label values party_closep vallab1
codebook V202441
codebook party_closep

codebook V202442
gen party_closerp = V202442
label variable party_closerp "Does R feel closer to one party dummy (post)"
replace party_closerp=. if inrange(V202442, -9, -1)
replace party_closerp=0 if V202442==5
label values party_closerp vallab1
codebook V202442
codebook party_closerp

codebook V202443
gen dem_closep = V202443
label variable dem_closep "R feels closest to Democratic Party dummy (post)"
replace dem_closep=. if inrange(V202443, -9, -1)
replace dem_closep=0 if V202443==3 | V202443==7
label values dem_closep vallab1
codebook V202443
codebook dem_closep

gen rep_closep = V202443
label variable rep_closep "R feels closest to Republican Party dumy (post)"
replace rep_closep=. if inrange(V202443, -9, -1)
replace rep_closep=0 if V202443==1 | V202443==7
replace rep_closep=1 if V202443==3
label values rep_closep vallab1
codebook V202443
codebook rep_closep

codebook V202444
gen how_closep = V202444
label variable how_closep "Degree of closeness to this party (post)"
replace how_closep=. if inrange(V202444, -9, -1)
replace how_closep=1 if V202444==3
replace how_closep=3 if V202444==1
label define vallab162 1 "Not very close" 2 "Somewhat close" 3 "Very close"
label values how_closep vallab162
codebook V202444
codebook how_closep

///V202445-V202449 are not present///
codebook V202450a
gen any_sonp = V202450a
label variable any_sonp "R has one or more sons dummy (post)"
replace any_sonp=. if inrange(V202450a, -9, -5)
label values any_sonp vallab1
codebook V202450a
codebook any_sonp

codebook V202450b
gen any_daughterp = V202450b
label variable any_daughterp "R has one or more daughters dummy (post)"
replace any_daughterp=. if inrange(V202450b, -9, -5)
label values any_daughterp vallab1
codebook V202450b
codebook any_daughterp

codebook V202450c
gen no_childrenp = V202450c
label variable no_childrenp "R has no sons and no daughters dummy (post)"
replace no_childrenp=. if inrange(V202450c, -9, -5)
label values no_childrenp vallab1
codebook V202450c
codebook no_childrenp

codebook V202451
gen diff_hurtp = V202451
label variable diff_hurtp "How much have political differences hurt relationships w/family (post)"
replace diff_hurtp=. if inrange(V202451, -9, -5)
replace diff_hurtp=0 if V202451==5
replace diff_hurtp=1 if V202451==4
replace diff_hurtp=2 if V202451==3
replace diff_hurtp=3 if V202451==2
replace diff_hurtp=4 if V202451==1
label values diff_hurtp vallab58
codebook V202451
codebook diff_hurtp

codebook V202452
gen concernp = V202452
label variable concernp "How often does R have concerned feelings for other racial/ethnic groups (post)"
replace concernp=. if inrange(V202452, -9, -5)
replace concernp=0 if V202452==5
replace concernp=1 if V202452==4
replace concernp=2 if V202452==3
replace concernp=3 if V202452==2
replace concernp=4 if V202452==1
label define vallab163 0 "Not at all often" 1 "Not too often" 2 "Somewhat often" 3 "Very often" 4 "Extremely often"
label values concernp vallab163
codebook V202452
codebook concernp

codebook V202453
gen understand_perspp = V202453
label variable understand_perspp "How often does R try to understnad perspective of other racial/ethnic group (post)"
replace understand_perspp=. if inrange(V202453, -9, -5)
replace understand_perspp=0 if V202453==5
replace understand_perspp=1 if V202453==4
replace understand_perspp=2 if V202453==3
replace understand_perspp=3 if V202453==2
replace understand_perspp=4 if V202453==1
label values understand_perspp vallab163
codebook V202453
codebook understand_perspp

codebook V202454
gen imagine_placep = V202454
label variable imagine_placep "How often R imagines how they would feel before criticizing other groups (post)"
replace imagine_placep=. if inrange(V202454, -9, -5)
replace imagine_placep=0 if V202454==5
replace imagine_placep=1 if V202454==4
replace imagine_placep=2 if V202454==3
replace imagine_placep=3 if V202454==2
replace imagine_placep=4 if V202454==1
label values imagine_placep vallab163
codebook V202454
codebook imagine_placep

codebook V202455
gen protectivep = V202455
label variable protectivep "How often R feels protective of someone due to race or ethnicity (post)"
replace protectivep=. if inrange(V202455, -9, -5)
replace protectivep=0 if V202455==5
replace protectivep=1 if V202455==4
replace protectivep=2 if V202455==3
replace protectivep=3 if V202455==2
replace protectivep=4 if V202455==1
label values protectivep vallab163
codebook V202455
codebook protectivep

codebook V202456
gen stop_quesp = V202456
label variable stop_quesp "During past 12 months, R or any family members stopped or questioned by police dummy (post)"
replace stop_quesp=. if inrange(V202456, -9, -5)
replace stop_quesp=0 if V202456==2
label values stop_quesp vallab1
codebook V202456
codebook stop_quesp

codebook V202457
gen arrestedp = V202457
label variable arrestedp "Has R ever been arrested dummy (post)"
replace arrestedp=. if inrange(V202457, -9, -5)
replace arrestedp=0 if V202457==2
label values arrestedp vallab1
codebook V202457
codebook arrestedp

///V202458-V202467 all -3///
codebook V202468x
gen hh_income_sump = V202468x
label variable hh_income_sump "Summary: total household income (post)"
replace hh_income_sump=. if V202468x==-9 | V202468x==-5
label values hh_income_sump vallab101
codebook V202468x
codebook hh_income_sump

codebook V202469
gen smoke_lifep = V202469
label variable smoke_lifep "R smoked 100 cigarettes in life dummy(post)"
replace smoke_lifep=. if inrange(V202469, -9, -5)
replace smoke_lifep=0 if V202469==2
label values smoke_lifep vallab1
codebook V202469
codebook smoke_lifep

codebook V202470
gen smoke_nowp = V202470
label variable smoke_nowp "R curretnly smoking (post)"
replace smoke_nowp=. if inrange(V202470, -9, -1)
replace smoke_nowp=0 if V202470==3
replace smoke_nowp=1 if V202470==2
replace smoke_nowp=2 if V202470==1
label define vallab164 0 "Not at all" 1 "Some days" 2 "Every day"
codebook V202470
codebook smoke_nowp

codebook V202471
gen know_gayp = V202471
label variable know_gayp "R has family/neighbors/coworkers/friends who are gay, lesbian, or bisexual dummy (post)"
replace know_gayp=. if inrange(V202471, -9, -5)
replace know_gayp=0 if V202471==2
label values know_gayp vallab1
codebook V202471
codebook know_gayp

codebook V202472a
gen gay_familyp = V202472a
label variable gay_familyp "R's relationship to a homosexual/bisexual is immediate family dummy (post)"
replace gay_familyp=. if inrange(V202472a, -9, -1)
label values gay_familyp vallab1
codebook V202472a
codebook gay_familyp

codebook V202472b
gen gay_relativep = V202472b
label variable gay_relativep "R's relationship to a homosexual/bisexual is other relative dummy (post)"
replace gay_relativep=. if inrange(V202472b, -9, -1)
label values gay_relativep vallab1
codebook V202472b
codebook gay_relativep

codebook V202472c
gen gay_neighborp = V202472c
label variable gay_neighborp "R's relationship to a homosexual/bisexual is neighbor dummy (post)"
replace gay_neighborp=. if inrange(V202472c, -9, -1)
label values gay_neighborp vallab1
codebook V202472c
codebook gay_neighborp

codebook V202472d
gen gay_coworkerp = V202472d
label variable gay_coworkerp "R's relationship to a homosexual/bisexual is co-worker dummy (post)"
replace gay_coworkerp=. if inrange(V202472d, -9, -1)
label values gay_coworkerp vallab1
codebook V202472d
codebook gay_coworkerp

codebook V202472e
gen gay_friendp = V202472e
label variable gay_friendp "R's relationship to a homosexual/bisexual is close friend dummy (post)"
replace gay_friendp=. if inrange(V202472e, -9, -1)
label values gay_friendp vallab1
codebook V202472e
codebook gay_friendp

codebook V202472f
gen other_gayp = V202472f
label variable other_gayp "R's relationship to a homosexual/bisexual is another relationship dummy (post)"
replace other_gayp=. if inrange(V202472f, -9, -1)
label values other_gayp vallab1
codebook V202472f
codebook other_gayp

codebook V202473
gen know_transp = V202473
label variable know_transp "R has family/neighbors/coworkers/friends who are transgender dummy (post)"
replace know_transp=. if inrange(V202473, -9, -5)
replace know_transp=0 if V202473==2
label values know_transp vallab1
codebook V202473
codebook know_transp

codebook V202474a
gen trans_familyp = V202474a
label variable trans_familyp "R's relationship to a transgender person is immediate family dummy (post)"
replace trans_familyp=. if inrange(V202474a, -9, -1)
label values trans_familyp vallab1
codebook V202474a
codebook trans_familyp

codebook V202474b
gen trans_relativep = V202474b
label variable trans_relativep "R's relationship to a transgender person is other relative dummy (post)"
replace trans_relativep=. if inrange(V202474b, -9, -1)
label values trans_relativep vallab1
codebook V202474b
codebook trans_relativep

codebook V202474c
gen trans_neighborp = V202474c
label variable trans_neighborp "R's relationship to a transgender person is neighbor dummy (post)"
replace trans_neighborp=. if inrange(V202474c, -9, -1)
label values trans_neighborp vallab1
codebook V202474c
codebook trans_neighborp

codebook V202474d
gen trans_coworkerp = V202474d
label variable trans_coworkerp "R's relationship to a transgender person is co-worker dummy (post)"
replace trans_coworkerp=. if inrange(V202474d, -9, -1)
label values trans_coworkerp vallab1
codebook V202474d
codebook trans_coworkerp

codebook V202474e
gen trans_friendp = V202474e
label variable trans_friendp "R's relationship to a transgender person is close friend dummy (post)"
replace trans_friendp=. if inrange(V202474e, -9, -1)
label values trans_friendp vallab1
codebook V202474e
codebook trans_friendp

codebook V202474f
gen other_transp = V202474f
label variable other_transp "R's relationship to a transgender person is another relationship dummy (post)"
replace other_transp=. if inrange(V202474f, -9, -1)
label values other_transp vallab1
codebook V202474f
codebook other_transp

codebook V202475
gen feminist_idp = V202475
label variable feminist_idp "R considers self a feminist dummy (post)"
replace feminist_idp=. if inrange(V202475, -9, -5)
replace feminist_idp=0 if V202475==2 | V202475==3
label values feminist_idp vallab1
codebook V202475
codebook feminist_idp

gen antifem_idp = V202475
label variable antifem_idp "R considers self an anti-feminist dummy (post)"
replace antifem_idp=. if inrange(V202475, -9, -5)
replace antifem_idp=0 if V202475==1 | V202475==3
replace antifem_idp=1 if V202475==2
label values antifem_idp vallab1
codebook V202475
codebook antifem_idp

gen nofem_idp = V202475
label variable nofem_idp "R considers themself neither a feminist nor an anti-feminist dummy (post)"
replace nofem_idp=. if inrange(V202475, -9, -5)
replace nofem_idp=0 if V202475==1 | V202475==2
replace nofem_idp=1 if V202475==3
label values nofem_idp vallab1
codebook V202475
codebook nofem_idp

codebook V202476
gen fem_impp = V202476
label variable fem_impp "How important is being a feminist (post)"
replace fem_impp=. if inrange(V202476, -7, -1)
replace fem_impp=0 if V202476==5
replace fem_impp=1 if V202476==4
replace fem_impp=2 if V202476==3
replace fem_impp=3 if V202476==2
replace fem_impp=4 if V202476==1
label values fem_impp vallab30
codebook V202476
codebook fem_impp

codebook V202477
gen asian_amer_fthermp = V202477
label variable asian_amer_fthermp "Feeling Thermometer: Asian-Americans (post)"
replace asian_amer_fthermp=. if inrange(V202477, -9, -1)
codebook V202477
codebook asian_amer_fthermp

codebook V202478
gen asian_fthermp = V202478
label variable asian_fthermp "Feeling Thermometer: Asians (post)"
replace asian_fthermp=. if inrange(V202478, -9, -1)
codebook V202478
codebook asian_fthermp

codebook V202479
gen hispanic_fthermp = V202479
label variable hispanic_fthermp "Feeling Thermometer: Hispanics (post)"
replace hispanic_fthermp=. if inrange(V202479, -9, -5)
codebook V202479
codebook hispanic_fthermp

codebook V202480
gen black_fthermp = V202480
label variable black_fthermp "Feeling Thermometer: blacks (post)"
replace black_fthermp=. if inrange(V202480, -9, -5)
codebook V202480
codebook black_fthermp

codebook V202481
gen illimm_fthermp = V202481
label variable illimm_fthermp "Feeling Thermometer: Illegal Immigrants (post)"
replace illimm_fthermp=. if inrange(V202481, -9, -5)
codebook V202481
codebook illimm_fthermp

codebook V202482
gen white_fthermp = V202482
label variable white_fthermp "Feeling Thermometer: Whites (post)"
replace white_fthermp=. if inrange(V202482, -9, -5)
codebook V202482
codebook white_fthermp

///V202483-V202486 all -2///
codebook V202487
gen white_jobp = V202487
label variable white_jobp "How likely whites unable to find jobs because employers hiring minorities (post)"
replace white_jobp=. if inrange(V202487, -9, -5)
replace white_jobp=0 if V202487==5
replace white_jobp=1 if V202487==4
replace white_jobp=2 if V202487==3
replace white_jobp=3 if V202487==2
replace white_jobp=4 if V202487==1
label values white_jobp vallab12
codebook V202487
codebook white_jobp

codebook V202488
gen gov_treatp = V202488
label variable gov_treatp "Does federal government treat blacks or whites better (post)"
replace gov_treatp=. if inrange(V202488, -9, -5)
label define vallab165 1 "Treat whites better" 2 "Treat both the same" 3 "Treat blacks better"
label values gov_treatp vallab165
codebook V202488
codebook gov_treatp

codebook V202490x
gen gov_treat_sump = V202490x
label variable gov_treat_sump "Summary: Federal government treats blacks or whites better (post)"
replace gov_treat_sump=. if inrange(V202490x, -7, -2)
label define vallab166 1 "Treat whites much better" 2 "Treat whites moderately better" 3 "Treat whites a little better" 4 "Treat both the same" 5 "Treat blacks a little better" 6 "Treat blacks moderately better" 7 "Treat blacks much better"
label values gov_treat_sump vallab166
tab V202490x
codebook gov_treat_sump

codebook V202491
gen police_treatp = V202491
label variable police_treatp "Do police treat blacks or whites better (post)"
replace police_treatp=. if inrange(V202491, -9, -5)
label values police_treatp vallab165
codebook V202491
codebook police_treatp

codebook V202493x
gen police_treat_sump = V202493x
label variable police_treat_sump "Summary: police treat blacks or whites better (post)"
replace police_treat_sump=. if inrange(V202493x, -7, -2)
label values police_treat_sump vallab166
tab V202493x
codebook police_treat_sump

codebook V202494
gen white_infp = V202494
label variable white_infp "How much influence do whites have in US politics (post)"
replace white_infp=. if inrange(V202494, -9, -5)
replace white_infp=1 if V202494==3
replace white_infp=3 if V202494==1
label define vallab167 1 "Too little influnce" 2 "Just about the right amount of influence" 3 "Too much influence"
label values white_infp vallab167
codebook V202494
codebook white_infp

codebook V202495
gen black_infp = V202495
label variable black_infp "How much influence do blacks have in US politics (post)"
replace black_infp=. if inrange(V202495, -9, -5)
replace black_infp=1 if V202495==3
replace black_infp=3 if V202495==1
label values black_infp vallab167
codebook V202495
codebook black_infp

codebook V202496
gen hispanic_infp = V202496
label variable hispanic_infp "How much influence do Hispanics have in US politics (post)"
replace hispanic_infp=. if inrange(V202496, -9, -5)
replace hispanic_infp=1 if V202496==3
replace hispanic_infp=3 if V202496==1
label values hispanic_infp vallab167
codebook V202496
codebook hispanic_infp

codebook V202497
gen asian_infp = V202497
label variable asian_infp "How much influence do Asians have in US politics (post)"
replace asian_infp=. if inrange(V202497, -9, -5)
replace asian_infp=1 if V202497==3
replace asian_infp=3 if V202497==1
label values asian_infp vallab167
codebook V202497
codebook asian_infp

///V202498x-V202502x all -2///
codebook V202504
gen amer_idp = V202504
label variable amer_idp "How important is being American to R's identity (post)"
replace amer_idp=. if inrange(V202504, -9, -5)
replace amer_idp=0 if V202504==5
replace amer_idp=1 if V202504==4
replace amer_idp=2 if V202504==3
replace amer_idp=3 if V202504==2
replace amer_idp=4 if V202504==1
label values amer_idp vallab30
codebook V202504
codebook amer_idp

codebook V202505
gen aff_whitep = V202505
label variable aff_whitep "White R: what happens to white people will affect R's life (post)"
replace aff_whitep=. if inrange(V202505, -7, -1)
replace aff_whitep=0 if V202505==4
replace aff_whitep=1 if V202505==3
replace aff_whitep=3 if V202505==1
label define vallab168 0 "Not at all" 1 "Not very much" 2 "Some" 3 "A lot"
label values aff_whitep vallab168
codebook V202505
codebook aff_whitep

codebook V202506
gen aff_hispanicp = V202506
label variable aff_hispanicp "Hispanic R: what happens to Hispanic people will affect R's life (post)"
replace aff_hispanicp=. if inrange(V202506, -7, -1)
replace aff_hispanicp=0 if V202506==4
replace aff_hispanicp=1 if V202506==3
replace aff_hispanicp=3 if V202506==1
label values aff_hispanicp vallab168
codebook V202506
codebook aff_hispanicp

codebook V202507
gen aff_blackp = V202507
label variable aff_blackp "Black R: what happens to black people will affect R's life (post)"
replace aff_blackp=. if inrange(V202507, -7, -1)
replace aff_blackp=0 if V202507==4
replace aff_blackp=1 if V202507==3
replace aff_blackp=3 if V202507==1
label values aff_blackp vallab168
codebook V202507
codebook aff_blackp

codebook V202508
gen aff_asianp = V202508
label variable aff_asianp "Asian R: what happens to Asian people will affect R's life (post)"
replace aff_asianp=. if inrange(V202408, -7, -1)
replace aff_asianp=0 if V202508==4
replace aff_asianp=1 if V202508==3
replace aff_asianp=3 if V202508==1
label values aff_asianp vallab168
codebook V202508
codebook aff_asianp

///There is no V202509-V202514///
codebook V202515
gen white_hwkp = V202515
label variable white_hwkp "Stereotype: Whites hardworking (post)"
replace white_hwkp=. if inrange(V202515, -9, -5)
label define vallab169 1 "Hard-working" 7 "Lazy"
label values white_hwkp vallab169
tab V202515
codebook white_hwkp

codebook V202516
gen black_hwkp = V202516
label variable black_hwkp "Stereotype: Blacks hardworking (post)"
replace black_hwkp=. if inrange(V202516, -9, -5)
label values black_hwkp vallab169
tab V202516
codebook black_hwkp

codebook V202517
gen hisp_amer_hwkp = V202517
label variable hisp_amer_hwkp "Stereotype: Hispanic-Americans hardworking (post)"
replace hisp_amer_hwkp=. if inrange(V202517, -9, -1)
label values hisp_amer_hwkp vallab169
tab V202517
codebook hisp_amer_hwkp

codebook V202518
gen hisp_hwkp = V202518
label variable hisp_hwkp "Stereotype: Hipsanics hardworking (post)"
replace hisp_hwkp=. if inrange(V202518, -9, -1)
label values hisp_hwkp vallab169
tab V202518
codebook hisp_hwkp

codebook V202519
gen asian_amer_hwkp = V202519
label variable asian_amer_hwkp "Stereotype: Asian-Americans hardworking (post)"
replace asian_amer_hwkp=. if inrange(V202519, -9, -1)
label values asian_amer_hwkp vallab169
tab V202519
codebook asian_amer_hwkp

codebook V202520
gen asian_hwkp = V202520
label variable asian_hwkp "Stereotype: Asians hardworking (post)"
replace asian_hwkp=. if inrange(V202520, -9, -1)
label values asian_hwkp vallab169
tab V202520
codebook asian_hwkp

codebook V202521
gen white_violp = V202521
label variable white_violp "Stereotype: Whites violent (post)"
replace white_violp=. if inrange(V202521, -9, -5)
label define vallab170 1 "Peaceful" 7 "Violent"
label values white_violp vallab170
tab V202521
codebook white_violp

codebook V202522
gen black_violp = V202522
label variable black_violp "Stereotype: Blacks violent (post)"
replace black_violp=. if inrange(V202522, -9, -5)
label values black_violp vallab170
tab V202522
codebook black_violp

gen blackstereotypes = (black_hwkp+black_violp)/14

codebook V202523
gen hisp_amer_violp = V202523
label variable hisp_amer_violp "Stereotype: Hispanic-Americans violent (post)"
replace hisp_amer_violp=. if inrange(V202523, -9, -1)
label values hisp_amer_violp vallab170
tab V202523
codebook hisp_amer_violp

codebook V202524
gen hisp_violp = V202524
label variable hisp_violp "Stereotype: Hispanics violent (post)"
replace hisp_violp=. if inrange(V202524, -9, -1)
label values hisp_violp vallab170
tab V202524
codebook hisp_violp

codebook V202525
gen asian_amer_violp = V202525
label variable asian_amer_violp "Stereotype: Asian-Americans violent (post)"
replace asian_amer_violp=. if inrange(V202525, -9, -1)
label values asian_amer_violp vallab170
tab V202525
codebook asian_amer_violp

codebook V202526
gen asian_violp = V202526
label variable asian_violp "Stereotype: Asians violent (post)"
replace asian_violp=. if inrange(V202526, -9, -1)
label values asian_violp vallab170
tab V202526
codebook asian_violp

codebook V202527
gen black_discp = V202527
label variable black_discp "Discrimination in the US against blacks (post)"
replace black_discp=. if inrange(V202527, -9, -5)
replace black_discp=0 if V202527==5
replace black_discp=1 if V202527==4
replace black_discp=2 if V202527==3
replace black_discp=3 if V202527==2
replace black_discp=4 if V202527==1
label values black_discp vallab58
codebook V202527
codebook black_discp

codebook V202528
gen hisp_discp = V202528
label variable hisp_discp "Discrimination in the US against Hispanics (post)"
replace hisp_discp=. if inrange(V202528, -9, -5)
replace hisp_discp=0 if V202528==5
replace hisp_discp=1 if V202528==4
replace hisp_discp=2 if V202528==3
replace hisp_discp=3 if V202528==2
replace hisp_discp=4 if V202528==1
label values hisp_discp vallab58
codebook V202528
codebook hisp_discp

codebook V202529
gen asian_discp = V202529
label variable asian_discp "Discrimination in the US against Asians (post)"
replace asian_discp=. if inrange(V202529, -9, -5)
replace asian_discp=0 if V202529==5
replace asian_discp=1 if V202529==4
replace asian_discp=2 if V202529==3
replace asian_discp=3 if V202529==2
replace asian_discp=4 if V202529==1
label values asian_discp vallab58
codebook V202529
codebook asian_discp

codebook V202530
gen white_discp = V202530
label variable white_discp "Dicrimination in the US against whites (post)"
replace white_discp=. if inrange(V202530, -9, -5)
replace white_discp=0 if V202530==5
replace white_discp=1 if V202530==4
replace white_discp=2 if V202530==3
replace white_discp=3 if V202530==2
replace white_discp=4 if V202530==1
label values white_discp vallab58
codebook V202530
codebook white_discp

codebook V202531
gen gay_discp = V202531
label variable gay_discp "Discrimination in the US against Gays and Lesbians (post)"
replace gay_discp=. if inrange(V202531, -9, -5)
replace gay_discp=0 if V202531==5
replace gay_discp=1 if V202531==4
replace gay_discp=2 if V202531==3
replace gay_discp=3 if V202531==2
replace gay_discp=4 if V202531==1
label values gay_discp vallab58
codebook V202531
codebook gay_discp

codebook V202534
gen women_discp = V202534
label variable women_discp "Discrimination in the US against women (post)"
replace women_discp=. if inrange(V202534, -9, -5)
replace women_discp=0 if V202534==5
replace women_discp=1 if V202534==4
replace women_discp=2 if V202534==3
replace women_discp=3 if V202534==2
replace women_discp=4 if V202534==1
label values women_discp vallab58
codebook V202534
codebook women_discp

codebook V202533
gen men_discp = V202533
label variable men_discp "Discrimination in the US against men (post)"
replace men_discp=. if inrange(V202533, -9, -5)
replace men_discp=0 if V202533==5
replace men_discp=1 if V202533==4
replace men_discp=2 if V202533==3
replace men_discp=3 if V202533==2
replace men_discp=4 if V202533==1
label values men_discp vallab58
codebook V202533
codebook men_discp

codebook V202534
gen muslim_discp = V202534
label variable muslim_discp "Discrimination in the US against Muslims (post)"
replace muslim_discp=. if inrange(V202534, -9, -5)
replace muslim_discp=0 if V202534==5
replace muslim_discp=1 if V202534==4
replace muslim_discp=2 if V202534==3
replace muslim_discp=3 if V202534==2
replace muslim_discp=4 if V202534==1
label values muslim_discp vallab58
codebook V202534
codebook muslim_discp

codebook V202535
gen xian_discp = V202535
label variable xian_discp "Discriination in the US against Christians (post)"
replace xian_discp=. if inrange(V202535, -9, -5)
replace xian_discp=0 if V202535==5
replace xian_discp=1 if V202535==4
replace xian_discp=2 if V202535==3
replace xian_discp=3 if V202535==2
replace xian_discp=4 if V202535==1
label values xian_discp vallab58
codebook V202535
codebook xian_discp

codebook V202536
gen trans_discp = V202536
label variable trans_discp "Discrimination in the US against transgender people (post)"
replace trans_discp=. if inrange(V202536, -9, -5)
replace trans_discp=0 if V202536==5
replace trans_discp=1 if V202536==4
replace trans_discp=2 if V202536==3
replace trans_discp=3 if V202536==2
replace trans_discp=4 if V202536==1
label values trans_discp vallab58
codebook V202536
codebook trans_discp

codebook V202537
gen personal_discp = V202537
label variable personal_discp "How much discrimination has R faced personally because of race/ethnicity (post)"
replace personal_discp=. if inrange(V202537, -9, -5)
replace personal_discp=0 if V202537==5
replace personal_discp=1 if V202537==4
replace personal_discp=2 if V202537==3
replace personal_discp=3 if V202537==2
replace personal_discp=4 if V202537==1
label values personal_discp vallab58
codebook V202537
codebook personal_discp

codebook V202538
gen gender_discp = V202538
label variable gender_discp "How much discrimination has R faced because of gender (post)"
replace gender_discp=. if inrange(V202538, -9, -5)
replace gender_discp=0 if V202538==5
replace gender_discp=1 if V202538==4
replace gender_discp=2 if V202538==3
replace gender_discp=3 if V202538==2
replace gender_discp=4 if V202538==1
label values gender_discp vallab58
codebook V202538
codebook gender_discp

codebook V202539
gen sex_harrassp = V202539
label variable sex_harrassp "Has R experienced harrassment at work dummy (post)"
replace sex_harrassp=. if inrange(V202539, -9, -5)
replace sex_harrassp=0 if V202539==2
label values sex_harrassp vallab1
codebook V202539
codebook sex_harrassp

codebook V202540
gen harrass_amtp = V202540
label variable harrass_amtp "How often has R experienced harrassment at work (post)"
replace harrass_amtp=. if inrange(V202540, -9, -1)
label define vallab171 1 "Once" 2 "A few times" 3 "Many times"
label values harrass_amtp vallab171
codebook V202540
codebook harrass_amtp

codebook V202541a
gen visit_fcbkp = V202541a
label variable visit_fcbkp "R visits Facebook dummy (post)"
replace visit_fcbkp=. if inrange(V202541a, -9, -5)
label values visit_fcbkp vallab1
codebook V202541a
codebook visit_fcbkp

codebook V202541b
gen visit_twtrp = V202541b
label variable visit_twtrp "R visits Twitter dummy (post)"
replace visit_twtrp=. if inrange(V202541b, -9, -5)
label values visit_twtrp vallab1
codebook V202541b
codebook visit_twtrp

codebook V202541c
gen visit_instap = V202541c
label variable visit_instap "R visits Instagram dummy (post)"
replace visit_instap=. if inrange(V202541c, -9, -5)
label values visit_instap vallab1
codebook V202541c
codebook visit_instap

codebook V202541d
gen visit_redditp = V202541d
label variable visit_redditp "R visits Reddit dummy (post)"
replace visit_redditp=. if inrange(V202541d, -9, -5)
label values visit_redditp vallab1
codebook V202541d
codebook visit_redditp

codebook V202541e
gen visit_ytp = V202541e
label variable visit_ytp "R visits YouTube dummy (post)"
replace visit_ytp=. if inrange(V202541e, -9, -5)
label values visit_ytp vallab1
codebook V202541e
codebook visit_ytp

codebook V202541f
gen visit_snapp = V202541f
label variable visit_snapp "R visits SnapChat dummy (post)"
replace visit_snapp=. if inrange(V202541f, -9, -5)
label values visit_snapp vallab1
codebook V202541f
codebook visit_snapp

codebook V202541g
gen visit_ttp = V202541g
label variable visit_ttp "R visits TikTok dummy (post)"
replace visit_ttp=. if inrange(V202541g, -9, -5)
label values visit_ttp vallab1
codebook V202541g
codebook visit_ttp

codebook V202541h
gen visit_othersmp = V202541h
label variable visit_othersmp "R visited other social media platforms dummy (post)"
replace visit_othersmp=. if inrange(V202541h, -9, -5)
label values visit_othersmp vallab1
codebook V202541h
codebook visit_othersmp

codebook V202541i
gen visit_nosmp = V202541i
label variable visit_nosmp "R visited no listed social media platform dummy (post)"
replace visit_nosmp=. if inrange(V202541i, -9, -5)
label values visit_nosmp vallab1
codebook V202541i
codebook visit_nosmp

codebook V202542
gen fb_freqp = V202542
label variable fb_freqp "How often use Facebook (post)"
replace fb_freqp=. if inrange(V202542, -9, -1)
replace fb_freqp=1 if V202542==7
replace fb_freqp=2 if V202542==6
replace fb_freqp=3 if V202542==5
replace fb_freqp=5 if V202542==3
replace fb_freqp=6 if V202542==2
replace fb_freqp=7 if V202542==1
label define vallab172 1 "Less than once a month" 2 "Once or twice a month" 3 "About once a week" 4 "A few times each week" 5 "About once a day" 6 "A few times every day" 7 "Many times every day"
label values fb_freqp vallab172
tab V202542
codebook fb_freqp

codebook V202543
gen fb_postpolp = V202543
label variable fb_postpolp "How often post political content on Facebook
replace fb_postpolp=. if inrange(V202543, -9, -1)
replace fb_postpolp=0 if V202543==5
replace fb_postpolp=1 if V202543==4
replace fb_postpolp=2 if V202543==3
replace fb_postpolp=3 if V202543==2
replace fb_postpolp=4 if V202543==1
label values fb_postpolp vallab2
tab V202543
codebook fb_postpolp

codebook V202544
gen twit_freqp = V202544
label variable twit_freqp "How often use Twitter (post)"
replace twit_freqp=. if inrange(V202544, -9, -1)
replace twit_freqp=1 if V202544==7
replace twit_freqp=2 if V202544==6
replace twit_freqp=3 if V202544==5
replace twit_freqp=5 if V202544==3
replace twit_freqp=6 if V202544==2
replace twit_freqp=7 if V202544==1
label values twit_freqp vallab172
tab V202544
codebook twit_freqp

codebook V202545
gen twit_postpolp = V202545
label variable twit_postpolp "How often post political content on Twitter (post)"
replace twit_postpolp=. if inrange(V202545, -9, -1)
replace twit_postpolp=0 if V202545==5
replace twit_postpolp=1 if V202545==4
replace twit_postpolp=2 if V202545==3
replace twit_postpolp=3 if V202545==2
replace twit_postpolp=4 if V202545==1
label values twit_postpolp vallab2
tab V202545
codebook twit_postpolp

codebook V202546
gen reddit_freqp = V202546
label variable reddit_freqp "How often use Reddit (post)"
replace reddit_freqp=. if inrange(V202546, -9, -1)
replace reddit_freqp=1 if V202546==7
replace reddit_freqp=2 if V202546==6
replace reddit_freqp=3 if V202546==5
replace reddit_freqp=5 if V202546==3
replace reddit_freqp=6 if V202546==2
replace reddit_freqp=7 if V202546==1
label values reddit_freqp vallab172
tab V202546
codebook reddit_freqp

codebook V202547
gen reddit_postpolp = V202547
label variable reddit_postpolp "How often post political content on Reddit (post)"
replace reddit_postpolp=. if inrange(V202547, -9, -1)
replace reddit_postpolp=0 if V202547==5
replace reddit_postpolp=1 if V202547==4
replace reddit_postpolp=2 if V202547==3
replace reddit_postpolp=3 if V202547==2
replace reddit_postpolp=4 if V202547==1
label values reddit_postpolp vallab2
tab V202547
codebook reddit_postpolp

codebook V202548
gen unemp_ratep = V202548
label variable unemp_ratep "What is the current unemployment rate (post)"
replace unemp_ratep=. if inrange(V202548, -9, -5)
label define vallab173 1 "4.9%" 2 "6.9% (correct)" 3 "8.9%" 4 "10.9%"
label values unemp_ratep vallab173
codebook V202548
codebook unemp_ratep

codebook V202549
gen russ_interferep = V202549
label variable russ_interferep "Did Russia try to interfere in 2016 election or not dummy (post)"
replace russ_interferep=. if inrange(V202549, -9, -5)
replace russ_interferep=0 if V202549==2
label values russ_interferep vallab1
codebook V202549
codebook russ_interferep

codebook V202550
gen interf_confp = V202550
label variable interf_confp "How confident is R about that (their opinion on Russia interefering or not)"
replace interf_confp=. if inrange(V202550, -7, -1)
replace interf_confp=0 if V202550==1
replace interf_confp=1 if V202550==2
replace interf_confp=2 if V202550==3
replace interf_confp=3 if V202550==4
replace interf_confp=4 if V202550==5
label values interf_confp vallab15
codebook V202550
codebook interf_confp

codebook V202551
gen obama_deportp = V202551
label variable obama_deportp "Obama administration deported more immigrants than Trump administration dummy (post)"
replace obama_deportp=. if inrange(V202551, -9, -5)
replace obama_deportp=0 if V202551==1
replace obama_deportp=1 if V202551==2
label values obama_deportp vallab1
codebook V202551
codebook obama_deportp

gen trump_deportp = V202551
label variable trump_deportp "Trump administration deported more immigrants than Obama administration dummy (post)"
replace trump_deportp=. if inrange(V202551, -9, -5)
replace trump_deportp=0 if V202551==2
label values trump_deportp vallab1
codebook V202551
codebook trump_deportp

codebook V202552
gen deport_confp = V202552
label variable deport_confp "How confident is R about that (wehther Trump or Obama deported more immigrants) (post)"
replace deport_confp=. if inrange(V202552, -7, -1)
replace deport_confp=0 if V202552==1
replace deport_confp=1 if V202552==2
replace deport_confp=2 if V202552==3
replace deport_confp=3 if V202552==4
replace deport_confp=4 if V202552==5
label values deport_confp vallab15
codebook V202552
codebook deport_confp

codebook V202553
gen vax_autismp = V202553
label variable vax_autismp "Does most scientific evidence show vaccines cause autism dummy (post)"
replace vax_autismp=. if inrange(V202553, -9, -1)
replace vax_autismp=0 if V202553==2
label values vax_autismp vallab1
codebook V202553
codebook vax_autismp

codebook V202554
gen vax_confp = V202554
label variable vax_confp "How confident is R about that (whether vaccines cause autism) (post)"
replace vax_confp=. if inrange(V202554, -7, -1)
replace vax_confp=0 if V202554==1
replace vax_confp=1 if V202554==2
replace vax_confp=2 if V202554==3
replace vax_confp=3 if V202554==4
replace vax_confp=4 if V202554==5
label values vax_confp vallab15
codebook V202554
codebook vax_confp

codebook V202555
gen warmp = V202555
label variable warmp "Have world temperatures risen on average for last 100 years dummy (post)"
replace warmp=. if inrange(V202555, -9, -5)
replace warmp=0 if V202555==2
label values warmp vallab1
codebook V202555
codebook warmp

codebook V202556
gen warm_confp = V202556
label variable warm_confp "How confident is R about that (whether temp has risen for last 100 yrs) (post)"
replace warm_confp=. if inrange(V202556, -7, -1)
replace warm_confp=0 if V202556==1
replace warm_confp=1 if V202556==2
replace warm_confp=2 if V202556==3
replace warm_confp=3 if V202556==4
replace warm_confp=4 if V202556==5
label values warm_confp vallab15
codebook V202556
codebook warm_confp

codebook V202557
gen covid_labp = V202557
label variable covid_labp "Was the coronavirus (COVID-19) developed intentionally in a lab dummy (post)"
replace covid_labp=. if inrange(V202557, -9, -5)
replace covid_labp=0 if V202557==2
label values covid_labp vallab1
codebook V202557
codebook covid_labp

codebook V202558
gen covid_lab_confp = V202558
label variable covid_lab_confp "How confident is R about that (whether COVID has made in a lab) (post)"
replace covid_lab_confp=. if inrange(V202558, -7, -1)
replace covid_lab_confp=0 if V202558==1
replace covid_lab_confp=1 if V202558==2
replace covid_lab_confp=2 if V202558==3
replace covid_lab_confp=3 if V202558==4
replace covid_lab_confp=4 if V202558==5
label values covid_lab_confp vallab15
codebook V202558
codebook covid_lab_confp

codebook V202559
gen covid_drugp = V202559
label variable covid_drugp "Evidence that hydroxychloroquine is effective treatment for COVID-19 dummy (post)"
replace covid_drugp=. if inrange(V202559, -9, -5)
replace covid_drugp=0 if V202559==2
label values covid_drugp vallab1
codebook V202559
codebook covid_drugp

codebook V202560
gen covid_drug_confp = V202560
label variable covid_drug_confp "How confident is R about that (if hydroxycloroquine is useful COVID treatment) (post)"
replace covid_drug_confp=. if inrange(V202560, -7, -1)
replace covid_drug_confp=0 if V202560==1
replace covid_drug_confp=1 if V202560==2
replace covid_drug_confp=2 if V202560==3
replace covid_drug_confp=3 if V202560==4
replace covid_drug_confp=4 if V202560==5
label values covid_drug_confp vallab15
codebook V202560
codebook covid_drug_confp

codebook V202561
gen know_immp = V202561
label variable know_immp "Life experience: does R know someone who moved to U.S. from another country dummy (post)"
replace know_immp=. if inrange(V202561, -9, -5)
replace know_immp=0 if V202561==2
label values know_immp vallab1
codebook V202561
codebook know_immp

codebook V202562
gen coll_debtp = V202562
label variable coll_debtp "Life experience: does R currently owe money on student loans dummy (post)"
replace coll_debtp=. if inrange(V202562, -9, -5)
replace coll_debtp=0 if V202562==2
label values coll_debtp vallab1
codebook V202562
codebook coll_debtp

codebook V202563
gen pub_asstp = V202563
label variable pub_asstp "Life experience: has R ever received food stamps or other public assistance dummy (post)"
replace pub_asstp=. if inrange(V202563, -9, -5)
replace pub_asstp=0 if V202563==2
label values pub_asstp vallab1
codebook V202563
codebook pub_asstp

codebook V202564
gen retirep = V202564
label variable retirep "Life experience: does R have a pension or retirement account dummy (post)"
replace retirep=. if inrange(V202564, -9, -5)
replace retirep=0 if V202564==2
label values retirep vallab1
codebook V202564
codebook retirep

codebook V202565
gen buy_amerp = V202565
label variable buy_amerp "Life experience: does R choose products because they are made in America dummy (post)"
replace buy_amerp=. if inrange(V202565, -9, -5)
replace buy_amerp=0 if V202565==2
label values buy_amerp vallab1
codebook V202565
codebook buy_amerp

codebook V202566
gen fly_flagp = V202566
label variable fly_flagp "Life experience: has R displayed Ameircan flag on house in past year dummy (post)"
replace fly_flagp=. if inrange(V202566, -9, -5)
replace fly_flagp=0 if V202566==2
label values fly_flagp vallab1
codebook V202566
codebook fly_flagp

codebook V202567
gen huntp = V202567
label variable huntp "Life experience: has R gone hunting or fishing in past year dummy (post)"
replace huntp=. if inrange(V202567, -9, -5)
replace huntp=0 if V202567==2
label values huntp vallab1
codebook V202567
codebook huntp

codebook V202568
gen pub_transp = V202568
label variable pub_transp "Life experience: has R used public transportation in past year dummy (post)"
replace pub_transp=. if inrange(V202568, -9, -5)
replace pub_transp=0 if V202568==2
label values pub_transp vallab1
codebook V202568
codebook pub_transp

codebook V202569
gen sharkp = V202569
label variable sharkp "Life experience: has R ever been bitten by a shark dummy (post)"
replace sharkp=. if inrange(V202569, -9, -5)
replace sharkp=0 if V202569==2
label values sharkp vallab1



gen voted = turnoutp




gen age = r_age

gen income = hh_income_sum

gen education = edu_lvl

codebook female
* done

gen resimobi=.

replace resimobi=3 if V201016==1
replace resimobi=2 if V201016==2
replace resimobi=1 if V201016==3


gen ownhome=.
replace ownhome=1 if V201583>0
replace ownhome=0 if V201583<0


gen strpty = .
replace strpty=0 if party_id_7==4
replace strpty=1 if party_id_7==5
replace strpty=1 if party_id_7==3
replace strpty=2 if party_id_7==2
replace strpty=2 if party_id_7==6
replace strpty=3 if party_id_7==1
replace strpty=3 if party_id_7==7


gen church_attoft=.
replace church_attoft = 0 if V201452==2
replace church_attoft = 1 if V201452==1
replace church_attoft = 2 if V201454==1
replace church_attoft = 2 if V201454==2


codebook church_attoft



gen union = hh_union_member



gen contacted=.
replace contacted = 1 if V202005==1
replace contacted = 0 if V202005!=1



///There is no V202570-V202574///
///V202575-V202635 has only negative responses///

gen whitepos=.
replace whitepos=0 if r_white==1
replace whitepos=(whitepos+1) if white_discp>black_discp
replace whitepos=(whitepos+1) if white_discp>hisp_discp
replace whitepos=(whitepos+1) if white_discp>asian_discp
replace whitepos=(whitepos-1) if white_discp<black_discp
replace whitepos=(whitepos-1) if white_discp<hisp_discp
replace whitepos=(whitepos-1) if white_discp<asian_discp
replace whitepos=whitepos+4
tab whitepos

gen blackpos=.
replace blackpos=0 if r_black==1
replace blackpos=(blackpos+1) if black_discp>white_discp
replace blackpos=(blackpos+1) if black_discp>hisp_discp
replace blackpos=(blackpos+1) if black_discp>asian_discp
replace blackpos=(blackpos-1) if black_discp<white_discp
replace blackpos=(blackpos-1) if black_discp<hisp_discp
replace blackpos=(blackpos-1) if black_discp<asian_discp
replace blackpos=blackpos+4

tab blackpos

gen hisppos=.
replace hisppos=0 if r_hispanic==1
replace hisppos=(hisppos+1) if hisp_discp>white_discp
replace hisppos=(hisppos+1) if hisp_discp>black_discp
replace hisppos=(hisppos+1) if hisp_discp>asian_discp
replace hisppos=(hisppos-1) if hisp_discp<white_discp
replace hisppos=(hisppos-1) if hisp_discp<black_discp
replace hisppos=(hisppos-1) if hisp_discp<asian_discp
replace hisppos=hisppos+4

gen asianpos=.
replace asianpos=0 if r_aapi==1
replace asianpos=(asianpos+1) if asian_discp>white_discp
replace asianpos=(asianpos+1) if asian_discp>black_discp
replace asianpos=(asianpos+1) if asian_discp>hisp_discp
replace asianpos=(asianpos-1) if asian_discp<white_discp
replace asianpos=(asianpos-1) if asian_discp<black_discp
replace asianpos=(asianpos-1) if asian_discp<hisp_discp
replace asianpos=asianpos+4

gen reldep=whitepos/7

gen eb_index7 =0
replace eb_index7 = eb_index7+1 if V202009==1
replace eb_index7 = eb_index7+1 if V202013==1
replace eb_index7 = eb_index7+1 if V202014==1
replace eb_index7 = eb_index7+1 if V202015==1
replace eb_index7 = eb_index7+1 if V202016==1
replace eb_index7 = eb_index7+1 if V202017==1
replace eb_index7 = eb_index7+1 if V202019==1
replace eb_index7 = eb_index7+1 if V202021==1
replace eb_index7=eb_index7/8


gen V202009_R = 0
gen V202013_R = 0
gen V202014_R = 0
gen V202015_R = 0
gen V202016_R = 0
gen V202017_R = 0
gen V202019_R = 0
gen V202021_R = 0

replace V202009_R = 1 if V202009==1
replace V202013_R = 1 if V202013==1
replace V202014_R = 1 if V202014==1
replace V202015_R = 1 if V202015==1
replace V202016_R = 1 if V202016==1
replace V202017_R = 1 if V202017==1
replace V202019_R = 1 if V202019==1
replace V202021_R = 1 if V202021==1



gen ce_index = 0
replace ce_index = ce_index+1 if V202024==1
replace ce_index = ce_index+1 if V202025==1
replace ce_index = ce_index+1 if V202026==1
replace ce_index = ce_index+1 if V202027==1
replace ce_index = ce_index+1 if V202028==1
replace ce_index = ce_index+1 if V202029==1
replace ce_index = ce_index+1 if V202030==1
replace ce_index = ce_index+1 if V202031==1
replace ce_index = ce_index+1 if V202032==1
replace ce_index = ce_index+1 if V202033==1
replace ce_index = ce_index+1 if V202034==1
replace ce_index = ce_index+1 if V202036==1
replace ce_index = ce_index+1 if V202023==1
replace ce_index = ce_index+1 if V202040==1
replace ce_index = ce_index/14
tab ce_index


gen V202024_R=0
gen V202025_R=0
gen V202026_R=0
gen V202027_R=0
gen V202028_R=0
gen V202029_R=0
gen V202030_R=0
gen V202031_R=0
gen V202032_R=0
gen V202033_R=0
gen V202034_R=0
gen V202036_R=0
gen V202023_R=0
gen V202040_R=0

replace  V202024_R=1 if V202024==1
replace  V202025_R=1 if V202025==1
replace  V202026_R=1 if V202026==1
replace V202027_R =1 if V202027==1
replace  V202028_R=1 if V202028==1
replace  V202029_R=1 if V202029==1
replace  V202030_R=1 if V202030==1
replace V202031_R =1 if V202031==1
replace  V202032_R=1 if V202032==1
replace  V202033_R=1 if V202033==1
replace V202034_R =1 if V202034==1
replace V202036_R =1 if V202036==1
replace  V202023_R=1 if V202023==1
replace  V202040_R=1 if V202040==1


gen ruralconsciousness = .

replace ruralconsciousness= (rural_help_sump + rural_influence_sump + rural_respect_sump)/21

gen whiteid = .
replace whiteid=V202499x if V202499x>0

replace white_fthermp = . if white_fthermp<0

gen w_discrim = women_discp+1 if women_discp!=.

gen race_cat = .
replace race_cat=1 if r_white==1
replace race_cat=2 if r_black==1
replace race_cat=3 if r_aapi==1
replace race_cat=4 if r_hispanic==1


gen income_cat = .
replace income_cat = 1 if V202468x>0 & V202468x<4
replace income_cat = 2 if V202468x>=4 & V202468x<8
replace income_cat = 3 if V202468x>=7 & V202468x<=10
replace income_cat = 4 if V202468x>10 & V202468x<=14
replace income_cat = 5 if V202468x>14 & V202468x<=16
replace income_cat = 6 if V202468x>16 & V202468x<=19
replace income_cat = 7 if V202468x>19


gen feministft=.
replace feministft=V202160 if V202160>=0 & V202160<995


tab V202291
gen wequalitySF =.
replace wequalitySF=5 if V202291==1
replace wequalitySF=4 if V202291==2
replace wequalitySF=3 if V202291==3
replace wequalitySF=2 if V202291==4
replace wequalitySF=1 if V202291==5


tab V202292

gen wequalityMP =.

replace wequalityMP=5 if V202292==1
replace wequalityMP=4 if V202292==2
replace wequalityMP=3 if V202292==3
replace wequalityMP=2 if V202292==4
replace wequalityMP=1 if V202292==5

gen wequality = (wequalityMP + wequalitySF)/10




save "ANES 2020 Rec.dta", replace ///REPLACE WITH PATH TO ANES

